From f8aa4c194655d60668c88985be94f0809ae13a96 Mon Sep 17 00:00:00 2001 From: Juan Carlos Garcia Segovia Date: Fri, 22 Feb 2013 13:53:11 +0000 Subject: [PATCH] Allow downloading http://blip.tv/play/ embeded URLs --- youtube_dl/InfoExtractors.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index d3c3ac264..56618b119 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -2144,6 +2144,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/file/'+file_id + if '?' in url: cchar = '&' else: