mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
iqiyi: fix when no vip info
Signed-off-by: Zhang Ning <zhangn1985@gmail.com>
This commit is contained in:
parent
17386968c7
commit
a4ed785966
@ -148,12 +148,17 @@ class Iqiyi(VideoExtractor):
|
|||||||
log.i("vd: {} is not handled".format(stream['vd']))
|
log.i("vd: {} is not handled".format(stream['vd']))
|
||||||
log.i("info is {}".format(stream))
|
log.i("info is {}".format(stream))
|
||||||
# why I need do below???
|
# why I need do below???
|
||||||
if not 'BD' in self.stream_types:
|
try:
|
||||||
|
vip_vds = info['data']['ctl']['vip']['bids']
|
||||||
|
vip_conf = info['data']['ctl']['configs']
|
||||||
|
except:
|
||||||
|
return
|
||||||
|
if not 'BD' in self.streams.keys():
|
||||||
p1080_vids = []
|
p1080_vids = []
|
||||||
if 18 in info['data']['ctl']['vip']['bids']:
|
if 18 in vip_vds:
|
||||||
p1080_vids.append(info['data']['ctl']['configs']['18']['vid'])
|
p1080_vids.append(vip_conf['18']['vid'])
|
||||||
if 5 in info['data']['ctl']['vip']['bids']:
|
if 5 in vip_vds:
|
||||||
p1080_vids.append(info['data']['ctl']['configs']['5']['vid'])
|
p1080_vids.append(vip_conf['5']['vid'])
|
||||||
for v in p1080_vids:
|
for v in p1080_vids:
|
||||||
p1080_info = getVMS(tvid, v)
|
p1080_info = getVMS(tvid, v)
|
||||||
if info['code'] == 'A00000':
|
if info['code'] == 'A00000':
|
||||||
@ -161,12 +166,12 @@ class Iqiyi(VideoExtractor):
|
|||||||
self.streams['BD'] = {'video_profile': '1080p', 'container': 'm3u8', 'src': [p1080_url], 'size' : 0}
|
self.streams['BD'] = {'video_profile': '1080p', 'container': 'm3u8', 'src': [p1080_url], 'size' : 0}
|
||||||
break
|
break
|
||||||
|
|
||||||
if not '4k' in self.stream_types:
|
if not '4k' in self.streams.keys():
|
||||||
k4_vids = []
|
k4_vids = []
|
||||||
if 19 in info['data']['ctl']['vip']['bids']:
|
if 19 in vip_vds:
|
||||||
k4_vids.append(info['data']['ctl']['configs']['19']['vid'])
|
k4_vids.append(vip_conf['19']['vid'])
|
||||||
if 10 in info['data']['ctl']['vip']['bids']:
|
if 10 in vip_vds:
|
||||||
k4_vids.append(info['data']['ctl']['configs']['10']['vid'])
|
k4_vids.append(vip_conf['10']['vid'])
|
||||||
for v in k4_vids:
|
for v in k4_vids:
|
||||||
k4_info = getVMS(tvid, v)
|
k4_info = getVMS(tvid, v)
|
||||||
if info['code'] == 'A00000':
|
if info['code'] == 'A00000':
|
||||||
@ -246,4 +251,4 @@ class Iqiyi(VideoExtractor):
|
|||||||
site = Iqiyi()
|
site = Iqiyi()
|
||||||
download = site.download_by_url
|
download = site.download_by_url
|
||||||
iqiyi_download_by_vid = site.download_by_vid
|
iqiyi_download_by_vid = site.download_by_vid
|
||||||
download_playlist = site.download_playlist_by_url
|
download_playlist = site.download_playlist_by_url
|
||||||
|
Loading…
Reference in New Issue
Block a user