mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-28 13:11:49 +00:00
[utils] Properly handle list values in update_url()
An actual list value in a query update could have been treated as a list of values because of the key:list parse_qs format.
This commit is contained in:
parent
21caaf2380
commit
bbd3e7e999
1 changed files with 1 additions and 1 deletions
|
@ -4257,7 +4257,7 @@ def update_url(url, **kwargs):
|
||||||
query = kwargs.pop('query_update', None)
|
query = kwargs.pop('query_update', None)
|
||||||
if query:
|
if query:
|
||||||
qs = compat_parse_qs(url.query)
|
qs = compat_parse_qs(url.query)
|
||||||
qs.update(query)
|
qs.update((k, [v]) for k, v in query.items())
|
||||||
kwargs['query'] = compat_urllib_parse_urlencode(qs, True)
|
kwargs['query'] = compat_urllib_parse_urlencode(qs, True)
|
||||||
kwargs = compat_kwargs(kwargs)
|
kwargs = compat_kwargs(kwargs)
|
||||||
return compat_urllib_parse.urlunparse(url._replace(**kwargs))
|
return compat_urllib_parse.urlunparse(url._replace(**kwargs))
|
||||||
|
|
Loading…
Reference in a new issue