[viceland] fix info extraction(closes #8799)
This commit is contained in:
parent
d2ac04674d
commit
9fa5789279
2 changed files with 14 additions and 4 deletions
|
@ -26,8 +26,8 @@ class UplynkIE(InfoExtractor):
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _extract_uplynk_info(self, uplynk_content_url):
|
||||||
path, external_id, video_id, session_id = re.match(self._VALID_URL, url).groups()
|
path, external_id, video_id, session_id = re.match(UplynkIE._VALID_URL, uplynk_content_url).groups()
|
||||||
display_id = video_id or external_id
|
display_id = video_id or external_id
|
||||||
formats = self._extract_m3u8_formats('http://content.uplynk.com/%s.m3u8' % path, display_id, 'mp4')
|
formats = self._extract_m3u8_formats('http://content.uplynk.com/%s.m3u8' % path, display_id, 'mp4')
|
||||||
if session_id:
|
if session_id:
|
||||||
|
@ -49,8 +49,11 @@ class UplynkIE(InfoExtractor):
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
return self._extract_uplynk_info(url)
|
||||||
|
|
||||||
class UplynkPreplayIE(InfoExtractor):
|
|
||||||
|
class UplynkPreplayIE(UplynkIE):
|
||||||
_VALID_URL = r'https?://.*?\.uplynk\.com/preplay2?/(?P<path>ext/[0-9a-f]{32}/(?P<external_id>[^/?&]+)|(?P<id>[0-9a-f]{32}))\.json'
|
_VALID_URL = r'https?://.*?\.uplynk\.com/preplay2?/(?P<path>ext/[0-9a-f]{32}/(?P<external_id>[^/?&]+)|(?P<id>[0-9a-f]{32}))\.json'
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
@ -61,4 +64,4 @@ class UplynkPreplayIE(InfoExtractor):
|
||||||
session_id = preplay.get('sid')
|
session_id = preplay.get('sid')
|
||||||
if session_id:
|
if session_id:
|
||||||
content_url += '?pbs=' + session_id
|
content_url += '?pbs=' + session_id
|
||||||
return self.url_result(content_url, 'Uplynk')
|
return self._extract_uplynk_info(content_url)
|
||||||
|
|
|
@ -25,6 +25,13 @@ class VicelandIE(AdobePass):
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '57608447973ee7705f6fbd4e',
|
'id': '57608447973ee7705f6fbd4e',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
|
'title': 'CYBERWAR (Trailer)',
|
||||||
|
'description': 'Tapping into the geopolitics of hacking and surveillance, Ben Makuch travels the world to meet with hackers, government officials, and dissidents to investigate the ecosystem of cyberwarfare.',
|
||||||
|
'age_limit': 14,
|
||||||
|
'timestamp': 1466008539,
|
||||||
|
'upload_date': '20160615',
|
||||||
|
'uploader_id': '11',
|
||||||
|
'uploader': 'Viceland',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
# m3u8 download
|
# m3u8 download
|
||||||
|
|
Loading…
Reference in a new issue