From fb8a2ea3256db3d6328f97d1de3a4d556472b0c5 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 21 Feb 2023 09:57:44 -0700 Subject: [PATCH] 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 --- app/filter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/filter.py b/app/filter.py index 87b8404..d47aac1 100644 --- a/app/filter.py +++ b/app/filter.py @@ -188,6 +188,8 @@ class Filter: # 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)) > 3] + for link in footer.find_all('a', href=True): + link['href'] = f'{link["href"]}&preferences={self.config.preferences}' header = self.soup.find('header') if header: