Skip to content

Commit

Permalink
[utils] Properly handle list values in update_url()
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dirkf committed Sep 3, 2023
1 parent 21caaf2 commit bbd3e7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion youtube_dl/utils.py
Expand Up @@ -4257,7 +4257,7 @@ def update_url(url, **kwargs):
query = kwargs.pop('query_update', None)
if 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 = compat_kwargs(kwargs)
return compat_urllib_parse.urlunparse(url._replace(**kwargs))
Expand Down

0 comments on commit bbd3e7e

Please sign in to comment.