[yuja] add hls format
This commit is contained in:
parent
058e8f25ce
commit
4da3b77f01
@ -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')),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user