aboutsummaryrefslogtreecommitdiffhomepage
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authordirkf <[email protected]>2023-09-03 01:18:22 +0100
committerdirkf <[email protected]>2023-09-03 01:18:22 +0100
commitbbd3e7e9999877104e1e47a8ed49f3b90257f083 (patch)
tree653c221802470df97db9d51da4a63980243bc1f8 /youtube_dl/utils.py
parent21caaf23800c95451cec27dfac56df2c0f8de85a (diff)
downloadyoutube-dl-bbd3e7e9999877104e1e47a8ed49f3b90257f083.tar.gz
youtube-dl-bbd3e7e9999877104e1e47a8ed49f3b90257f083.zip
[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.
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 81ff78807..fdf41b025 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -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))