Fix: `keep_blank_values = True` to handle blank `q` input (#1052)
parent
a40b98341b
commit
4a0089686e
|
@ -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…
Reference in New Issue