mirror of
https://github.com/l1ving/youtube-dl
synced 2024-12-21 21:52:52 +08:00
[dailymotion] Raise ExtractorError if the dailymotion response reports an error
This commit is contained in:
parent
34308b30d6
commit
3a1d48d6de
@ -63,6 +63,9 @@ class DailymotionIE(SubtitlesInfoExtractor):
|
||||
info = self._search_regex(r'var info = ({.*?}),$', embed_page,
|
||||
'video info', flags=re.MULTILINE)
|
||||
info = json.loads(info)
|
||||
if info.get('error') is not None:
|
||||
msg = 'Couldn\'t get video, Dailymotion says: %s' % info['error']['title']
|
||||
raise ExtractorError(msg, expected=True)
|
||||
|
||||
# TODO: support choosing qualities
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user