aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/iqiyi.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-06-07 01:32:03 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-06-07 01:32:03 +0800
commitaacda28b28c1804866d634c5c5086b3d53cb2b2f (patch)
treeca8d33ec0a73bed857b454d3088641ece039a9c3 /youtube_dl/extractor/iqiyi.py
parent29e7e0781b1b8e276c28a079bc5b18e1b0db2d5e (diff)
downloadyoutube-dl-aacda28b28c1804866d634c5c5086b3d53cb2b2f.tar.xz
[iqiyi] Give error message for assertion failures
Diffstat (limited to 'youtube_dl/extractor/iqiyi.py')
-rw-r--r--youtube_dl/extractor/iqiyi.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/iqiyi.py b/youtube_dl/extractor/iqiyi.py
index 18a7587a2..dc35c3380 100644
--- a/youtube_dl/extractor/iqiyi.py
+++ b/youtube_dl/extractor/iqiyi.py
@@ -171,7 +171,10 @@ class IqiyiIE(InfoExtractor):
enc_key = self.get_enc_key(swf_url, video_id)
raw_data = self.get_raw_data(tvid, video_id, enc_key, _uuid)
- assert raw_data['code'] == 'A000000'
+
+ if raw_data['code'] != 'A000000':
+ raise ExtractorError('Unable to load data. Error code: ' + raw_data['code'])
+
if not raw_data['data']['vp']['tkl']:
raise ExtractorError('No support iQiqy VIP video')