mirror of
https://github.com/soimort/you-get.git
synced 2025-02-11 12:42:29 +03:00
extractors: bilibili: handle IndexError to fix download failure.
This commit is contained in:
parent
2748a02972
commit
8ebeb6c70d
@ -99,7 +99,10 @@ class Bilibili(VideoExtractor):
|
|||||||
info_only = kwargs.get('info_only')
|
info_only = kwargs.get('info_only')
|
||||||
for qlt in range(4, -1, -1):
|
for qlt in range(4, -1, -1):
|
||||||
api_xml = self.api_req(cid, qlt, bangumi, **kwargs)
|
api_xml = self.api_req(cid, qlt, bangumi, **kwargs)
|
||||||
|
try:
|
||||||
self.parse_bili_xml(api_xml)
|
self.parse_bili_xml(api_xml)
|
||||||
|
except IndexError as e:
|
||||||
|
pass # url = urls[0]: list index out of range; try next
|
||||||
if not info_only or stream_id:
|
if not info_only or stream_id:
|
||||||
self.danmuku = get_danmuku_xml(cid)
|
self.danmuku = get_danmuku_xml(cid)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user