extractors: bilibili: handle IndexError to fix download failure.

This commit is contained in:
Mo Zhou 2018-03-03 03:05:54 +00:00
parent 2748a02972
commit 8ebeb6c70d

View File

@ -99,7 +99,10 @@ class Bilibili(VideoExtractor):
info_only = kwargs.get('info_only')
for qlt in range(4, -1, -1):
api_xml = self.api_req(cid, qlt, bangumi, **kwargs)
self.parse_bili_xml(api_xml)
try:
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:
self.danmuku = get_danmuku_xml(cid)