Minor conditional fix in filter

main
Ben Busby 2020-04-29 14:46:00 -06:00
parent b83f14be26
commit c30f21f950
1 changed files with 3 additions and 5 deletions

View File

@ -120,9 +120,7 @@ class Filter:
param_val = query_params[param][0] if param in query_params else '' param_val = query_params[param][0] if param in query_params else ''
new_search += '&' + param + '=' + param_val new_search += '&' + param + '=' + param_val
a['href'] = new_search a['href'] = new_search
continue elif 'url?q=' in href:
if 'url?q=' in href:
# Strip unneeded arguments # Strip unneeded arguments
parsed_link = urlparse.urlparse(query_link) parsed_link = urlparse.urlparse(query_link)
link_args = parse_qs(parsed_link.query) link_args = parse_qs(parsed_link.query)
@ -146,7 +144,7 @@ class Filter:
# Add no-js option # Add no-js option
if self.nojs: if self.nojs:
gen_nojs(soup, query_link, a) gen_nojs(soup, query_link, a)
else:
a['href'] = href a['href'] = href