From e6db3112f780d113fc120a914c059a7d8b4f4695 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 7 Dec 2020 20:38:57 -0500 Subject: [PATCH] Fix pagination bug for pages > 3 The pagination footer on the results page after page 2 has three actions (beginning, next, previous). The footer filter was updated to remove items with more than three actions to fix this. See #131 --- app/filter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/filter.py b/app/filter.py index cd6feb6..64455ef 100644 --- a/app/filter.py +++ b/app/filter.py @@ -74,7 +74,8 @@ class Filter: footer = soup.find('footer') if footer: # Remove divs that have multiple links beyond just page navigation - [_.decompose() for _ in footer.find_all('div', recursive=False) if len(_.find_all('a', href=True)) > 2] + [_.decompose() for _ in footer.find_all('div', recursive=False) + if len(_.find_all('a', href=True)) > 3] header = soup.find('header') if header: