aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorJuan Carlos Garcia Segovia <jcarlosgarciasegovia@gmail.com>2013-03-01 10:22:16 +0000
committerJuan Carlos Garcia Segovia <jcarlosgarciasegovia@gmail.com>2013-03-01 10:22:16 +0000
commit7f9d41a55edb8e939c1bb69f0c3ad29380cad478 (patch)
treef14048fe578ae440c25b0a948afe1432258d16ed /youtube_dl
parent691db5ba02d3fccee605cea83ad25ba217f851a7 (diff)
downloadyoutube-dl-7f9d41a55edb8e939c1bb69f0c3ad29380cad478.tar.xz
Allow downloading http://blip.tv/play/ embeded URLs
Diffstat (limited to 'youtube_dl')
-rwxr-xr-xyoutube_dl/InfoExtractors.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index a94648dcf..64079d1fd 100755
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -2165,6 +2165,21 @@ class BlipTVIE(InfoExtractor):
self._downloader.trouble(u'ERROR: invalid URL: %s' % url)
return
+ if '/play/' in url:
+ request = compat_urllib_request.Request(url)
+ response = compat_urllib_request.urlopen(request)
+ redirecturl = response.geturl()
+ hashindex = redirecturl.find('#')
+ if hashindex!=-1:
+ hash = redirecturl[hashindex+1:]
+ params = compat_parse_qs(hash)
+ files = params['file']
+ for file in files:
+ match = re.search('/(\d+)',file)
+ if match:
+ file_id = match.group(1)
+ url = 'http://blip.tv/a/a-'+file_id
+
if '?' in url:
cchar = '&'
else: