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
main
Ben Busby 2020-12-07 20:38:57 -05:00
parent 51e69b579b
commit e6db3112f7
No known key found for this signature in database
GPG Key ID: 3B08611DF6E62ED2
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,8 @@ class Filter:
footer = soup.find('footer') footer = soup.find('footer')
if footer: if footer:
# Remove divs that have multiple links beyond just page navigation # 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') header = soup.find('header')
if header: if header: