From: Jaime Marquínez Ferrándiz Date: Sat, 21 Sep 2013 10:15:54 +0000 (+0200) Subject: [dailymotion] Raise ExtractorError if the dailymotion response reports an error X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=3a1d48d6de0159807ff57b2cec6766cbfd400f00;p=youtube-dl [dailymotion] Raise ExtractorError if the dailymotion response reports an error --- 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