Skip to content

A feature-rich command-line audio/video downloader

[utils] Don't touch URLs if not necessary

Yen Chi Hsuancacd99666248
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 8e53962c95..999dfabb59 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -1792,6 +1792,8 @@ def urlencode_postdata(*args, **kargs):
def update_url_query(url, query):
+ if not query:
+ return url
parsed_url = compat_urlparse.urlparse(url)
qs = compat_parse_qs(parsed_url.query)
qs.update(query)