diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2015-05-27 04:14:24 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2015-05-27 04:14:24 +0800 |
commit | b535170b218131afd1165776e611691479627ce8 (patch) | |
tree | 99b10aad6ec9190e442a6606e1b05533cdfbed2f /youtube_dl/extractor/bilibili.py | |
parent | 1434184c577953ff6fe558ccc6751697791f4076 (diff) |
[bilibili] Skip assertion if HQ videos not available
Diffstat (limited to 'youtube_dl/extractor/bilibili.py')
-rw-r--r-- | youtube_dl/extractor/bilibili.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/youtube_dl/extractor/bilibili.py b/youtube_dl/extractor/bilibili.py index 7ca835e31..a8bea2c10 100644 --- a/youtube_dl/extractor/bilibili.py +++ b/youtube_dl/extractor/bilibili.py @@ -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): |