mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-29 09:54:42 +01:00
[extractor/common] use compat_parse_qs in update_url_params
This commit is contained in:
parent
f3bdae76de
commit
fa9e259fd9
@ -20,6 +20,7 @@
|
|||||||
compat_urllib_error,
|
compat_urllib_error,
|
||||||
compat_urllib_parse,
|
compat_urllib_parse,
|
||||||
compat_urlparse,
|
compat_urlparse,
|
||||||
|
compat_parse_qs,
|
||||||
compat_str,
|
compat_str,
|
||||||
compat_etree_fromstring,
|
compat_etree_fromstring,
|
||||||
)
|
)
|
||||||
@ -519,7 +520,7 @@ def _parse_json(self, json_string, video_id, transform_source=None, fatal=True):
|
|||||||
|
|
||||||
def update_url_params(self, url, params):
|
def update_url_params(self, url, params):
|
||||||
parsed_url = compat_urlparse.urlparse(url)
|
parsed_url = compat_urlparse.urlparse(url)
|
||||||
qs = compat_urlparse.parse_qs(parsed_url.query)
|
qs = compat_parse_qs(parsed_url.query)
|
||||||
qs.update(params)
|
qs.update(params)
|
||||||
return compat_urlparse.urlunparse(
|
return compat_urlparse.urlunparse(
|
||||||
parsed_url._replace(query=compat_urllib_parse.urlencode(qs, True)))
|
parsed_url._replace(query=compat_urllib_parse.urlencode(qs, True)))
|
||||||
|
Loading…
Reference in New Issue
Block a user