aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-04-09 19:27:54 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-04-09 19:27:54 +0800
commitcacd9966624883523b264fa9ac48138074597730 (patch)
tree93081bf6364634222df9edbc94992a7dfd8a2fa5 /youtube_dl
parentbffb245a4882b10b5e66015fa89ef1cadf974415 (diff)
[utils] Don't touch URLs if not necessary
Fix test_Generic_15 (Google redirect)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 8e53962c9..999dfabb5 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)