diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-03-03 22:04:06 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-03-03 22:04:06 +0100 |
commit | f2e237adc8493fbd186cdc4a92cedfa0801a7faf (patch) | |
tree | 848926a797790f301775ff19fe78c58516bab8e0 | |
parent | 2e5457be1d2db836bfbd0c7e18b30ca4a0bbfef3 (diff) | |
parent | 7f9d41a55edb8e939c1bb69f0c3ad29380cad478 (diff) |
Merge remote-tracking branch 'jcarlosgarciasegovia/master'
-rwxr-xr-x | youtube_dl/InfoExtractors.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index c696bb968..d19efe93f 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: |