projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add experimental support for lazy loading the info extractors
[youtube-dl]
/
youtube_dl
/
extractor
/
iqiyi.py
diff --git
a/youtube_dl/extractor/iqiyi.py
b/youtube_dl/extractor/iqiyi.py
index 9e8c9432a6947ad2ad1866e257e577c98c3ac38b..88570f261c224983a7f38e6911a88005ef80923e 100644
(file)
--- a/
youtube_dl/extractor/iqiyi.py
+++ b/
youtube_dl/extractor/iqiyi.py
@@
-368,7
+368,10
@@
class IqiyiIE(InfoExtractor):
auth_req, video_id,
note='Downloading video authentication JSON',
errnote='Unable to download video authentication JSON')
auth_req, video_id,
note='Downloading video authentication JSON',
errnote='Unable to download video authentication JSON')
- if auth_result['code'] == 'Q00506': # requires a VIP account
+
+ if auth_result['code'] == 'Q00505': # No preview available (不允许试看鉴权失败)
+ raise ExtractorError('This video requires a VIP account', expected=True)
+ if auth_result['code'] == 'Q00506': # End of preview time (试看结束鉴权失败)
if do_report_warning:
self.report_warning('Needs a VIP account for full video')
return False
if do_report_warning:
self.report_warning('Needs a VIP account for full video')
return False