mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-01 02:37:25 +01:00
Allow downloading http://blip.tv/play/ embeded URLs
This commit is contained in:
parent
691db5ba02
commit
7f9d41a55e
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user