[yuja] add hls format

This commit is contained in:
Brian Clinkenbeard 2020-04-04 17:58:35 -07:00
parent 058e8f25ce
commit 4da3b77f01

View File

@ -69,10 +69,27 @@ class YuJaIE(InfoExtractor):
if data.get('youtubeCode'): if data.get('youtubeCode'):
return self.url_result(data.get('youtubeCode'), YoutubeIE.ie_key()) return self.url_result(data.get('youtubeCode'), YoutubeIE.ie_key())
formats = []
if data.get('videoHLSLink'):
formats.append({
'format_id': 'mp4_hls',
'url': data.get('videoHLSLink'),
'protocol': 'm3u8',
'ext': 'mp4',
})
if data.get('videoLinkMp4'):
formats.append({
'format_id': 'mp4',
'url': data.get('videoLinkMp4'),
'ext': 'mp4',
})
return { return {
'id': video_id, 'id': video_id,
'title': data.get('videoTitle'), 'title': data.get('videoTitle'),
'url': data.get('videoLinkMp4'), # 'url': data.get('videoLinkMp4'),
'formats': formats,
'thumbnail': 'https://%s.yuja.com%s' % (subdomain, data.get('thumbImage')), 'thumbnail': 'https://%s.yuja.com%s' % (subdomain, data.get('thumbImage')),
'description': data.get('description'), 'description': data.get('description'),
'timestamp': unified_timestamp(data.get('postedDate')), 'timestamp': unified_timestamp(data.get('postedDate')),