Include prefs arg in footer navigation

Navigating between pages of results now includes the user's preferences
string, which allows them to retain their config for a particular
instance between result pages.

Fixes #960
main
Ben Busby 2023-02-21 09:57:44 -07:00
parent 6b56dab4c1
commit fb8a2ea325
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1
1 changed files with 2 additions and 0 deletions

View File

@ -188,6 +188,8 @@ class Filter:
# 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) [_.decompose() for _ in footer.find_all('div', recursive=False)
if len(_.find_all('a', href=True)) > 3] if len(_.find_all('a', href=True)) > 3]
for link in footer.find_all('a', href=True):
link['href'] = f'{link["href"]}&preferences={self.config.preferences}'
header = self.soup.find('header') header = self.soup.find('header')
if header: if header: