Fix: `keep_blank_values = True` to handle blank `q` input (#1052)

pull/1012/merge
Ahmad Alkadri 9 months ago committed by GitHub
parent a40b98341b
commit 4a0089686e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -44,7 +44,7 @@ def extract_q(q_str: str, href: str) -> str:
Returns:
str: The 'q' element of the link, or an empty string
"""
return parse_qs(q_str)['q'][0] if ('&q=' in href or '?q=' in href) else ''
return parse_qs(q_str, keep_blank_values=True)['q'][0] if ('&q=' in href or '?q=' in href) else ''
def build_map_url(href: str) -> str:

Loading…
Cancel
Save