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
pull/157/head
Ben Busby 4 years ago
parent 51e69b579b
commit e6db3112f7
No known key found for this signature in database
GPG Key ID: 3B08611DF6E62ED2

@ -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:

Loading…
Cancel
Save