Browse Source

[bilibili] Skip assertion if HQ videos not available

totalwebcasting
Yen Chi Hsuan 9 years ago
parent
commit
b535170b21
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      youtube_dl/extractor/bilibili.py

+ 5
- 3
youtube_dl/extractor/bilibili.py View File

@ -80,9 +80,11 @@ class BiliBiliIE(InfoExtractor):
note='Downloading HQ video info',
fatal=False,
)
hq_durls = hq_doc.findall('./durl') if hq_doc is not False else itertools.repeat(None)
assert len(lq_durls) == len(hq_durls)
if hq_doc is not False:
hq_durls = hq_doc.findall('./durl')
assert len(lq_durls) == len(hq_durls)
else:
hq_durls = itertools.repeat(None)
i = 1
for lq_durl, hq_durl in zip(lq_durls, hq_durls):


Loading…
Cancel
Save