aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/vevo.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2014-05-10 04:34:53 +0700
committerSergey M․ <dstftw@gmail.com>2014-05-10 04:34:53 +0700
commite97e53eeed0c80f514839f2731a2dd5413e62cca (patch)
tree1326fb6e9600fbd117c0825e61bc35b3c530baf1 /youtube_dl/extractor/vevo.py
parent342f630dbf22946aa410e7445dd73256ecdfee43 (diff)
[vevo] Add friendly error output (#2874)
Diffstat (limited to 'youtube_dl/extractor/vevo.py')
-rw-r--r--youtube_dl/extractor/vevo.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/youtube_dl/extractor/vevo.py b/youtube_dl/extractor/vevo.py
index ee47c30ba..ea34a8f16 100644
--- a/youtube_dl/extractor/vevo.py
+++ b/youtube_dl/extractor/vevo.py
@@ -134,7 +134,13 @@ class VevoIE(InfoExtractor):
video_id = mobj.group('id')
json_url = 'http://videoplayer.vevo.com/VideoService/AuthenticateVideo?isrc=%s' % video_id
- video_info = self._download_json(json_url, video_id)['video']
+ response = self._download_json(json_url, video_id)
+ video_info = response['video']
+
+ if not video_info:
+ if 'statusMessage' in response:
+ raise ExtractorError('%s said: %s' % (self.IE_NAME, response['statusMessage']), expected=True)
+ raise ExtractorError('Unable to extract videos')
formats = self._formats_from_json(video_info)