projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
342f630
)
[vevo] Add friendly error output (#2874)
author
Sergey M․
<dstftw@gmail.com>
Fri, 9 May 2014 21:34:53 +0000
(
04:34
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Fri, 9 May 2014 21:34:53 +0000
(
04:34
+0700)
youtube_dl/extractor/vevo.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/vevo.py
b/youtube_dl/extractor/vevo.py
index ee47c30bab9bd37a5d8e75109f29108864db68d0..ea34a8f16c86008d663f3ceb0a7482b242160391 100644
(file)
--- 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_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)
formats = self._formats_from_json(video_info)