diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-09-21 12:15:54 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-09-21 12:15:54 +0200 |
commit | 3a1d48d6de0159807ff57b2cec6766cbfd400f00 (patch) | |
tree | 7f923603241683d71d690014f03b6cf6ae20bf8b | |
parent | 34308b30d6c2b05819e362deab94ce590c325e67 (diff) |
[dailymotion] Raise ExtractorError if the dailymotion response reports an error
-rw-r--r-- | youtube_dl/extractor/dailymotion.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/extractor/dailymotion.py b/youtube_dl/extractor/dailymotion.py index 360113f9c..ce7057a26 100644 --- a/youtube_dl/extractor/dailymotion.py +++ b/youtube_dl/extractor/dailymotion.py @@ -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 |