mirror of
https://github.com/soimort/you-get.git
synced 2025-01-24 05:55:02 +03:00
[iqiyi]H265 streams
This commit is contained in:
parent
c48c4beb6b
commit
f47096c201
@ -97,7 +97,9 @@ class Iqiyi(VideoExtractor):
|
||||
{'id': '4k', 'container': 'm3u8', 'video_profile': '4k'},
|
||||
{'id': 'BD', 'container': 'm3u8', 'video_profile': '1080p'},
|
||||
{'id': 'TD', 'container': 'm3u8', 'video_profile': '720p'},
|
||||
{'id': 'TD_H265', 'container': 'm3u8', 'video_profile': '720p H265'},
|
||||
{'id': 'HD', 'container': 'm3u8', 'video_profile': '540p'},
|
||||
{'id': 'HD_H265', 'container': 'm3u8', 'video_profile': '540p H265'},
|
||||
{'id': 'SD', 'container': 'm3u8', 'video_profile': '360p'},
|
||||
{'id': 'LD', 'container': 'm3u8', 'video_profile': '210p'},
|
||||
]
|
||||
@ -108,8 +110,8 @@ class Iqiyi(VideoExtractor):
|
||||
stream_to_bid = { '4k': 10, 'fullhd' : 5, 'suprt-high' : 4, 'super' : 3, 'high' : 2, 'standard' :1, 'topspeed' :96}
|
||||
'''
|
||||
ids = ['4k','BD', 'TD', 'HD', 'SD', 'LD']
|
||||
vd_2_id = {10: '4k', 19: '4k', 5:'BD', 18: 'BD', 21: 'HD', 2: 'HD', 4: 'TD', 17: 'TD', 96: 'LD', 1: 'SD'}
|
||||
id_2_profile = {'4k':'4k', 'BD': '1080p','TD': '720p', 'HD': '540p', 'SD': '360p', 'LD': '210p'}
|
||||
vd_2_id = {10: '4k', 19: '4k', 5:'BD', 18: 'BD', 21: 'HD_H265', 2: 'HD', 4: 'TD', 17: 'TD_H265', 96: 'LD', 1: 'SD', 14: 'TD'}
|
||||
id_2_profile = {'4k':'4k', 'BD': '1080p','TD': '720p', 'HD': '540p', 'SD': '360p', 'LD': '210p', 'HD_H265': '540p H265', 'TD_H265': '720p H265'}
|
||||
|
||||
|
||||
|
||||
@ -137,7 +139,7 @@ class Iqiyi(VideoExtractor):
|
||||
self.title = match1(html, '<title>([^<]+)').split('-')[0]
|
||||
tvid, videoid = self.vid
|
||||
info = getVMS(tvid, videoid)
|
||||
assert info['code'] == 'A00000', 'can\'t play this video'
|
||||
assert info['code'] == 'A00000', "can't play this video"
|
||||
|
||||
for stream in info['data']['vidl']:
|
||||
try:
|
||||
@ -145,8 +147,8 @@ class Iqiyi(VideoExtractor):
|
||||
if stream_id in self.stream_types:
|
||||
continue
|
||||
stream_profile = self.id_2_profile[stream_id]
|
||||
self.streams[stream_id] = {'video_profile': stream_profile, 'container': 'm3u8', 'src': [stream['m3u']], 'size' : 0}
|
||||
except:
|
||||
self.streams[stream_id] = {'video_profile': stream_profile, 'container': 'm3u8', 'src': [stream['m3u']], 'size' : 0, 'm3u8_url': stream['m3u']}
|
||||
except Exception as e:
|
||||
log.i("vd: {} is not handled".format(stream['vd']))
|
||||
log.i("info is {}".format(stream))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user