aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-01-07 05:34:14 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-01-07 05:34:14 +0100
commit79f82953039f832576f6d0202c7bbeaa2fd390c0 (patch)
tree245362cb28544d73f9acfcd97727c4d28ba9c082 /youtube_dl/utils.py
parent400e58103d97d54f858dd70c62e1070de8d3c718 (diff)
Use original Referer URL in Brightcove requests (Fixes #2110)
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 918a127ca..0b0d1eb90 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -1027,9 +1027,9 @@ def smuggle_url(url, data):
return url + u'#' + sdata
-def unsmuggle_url(smug_url):
+def unsmuggle_url(smug_url, default=None):
if not '#__youtubedl_smuggle' in smug_url:
- return smug_url, None
+ return smug_url, default
url, _, sdata = smug_url.rpartition(u'#')
jsond = compat_parse_qs(sdata)[u'__youtubedl_smuggle'][0]
data = json.loads(jsond)