From: Sergey M․ Date: Sat, 4 Apr 2015 16:43:34 +0000 (+0600) Subject: [culturebox] Check for unavailable videos X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=184a1974414bc91c5804251a33b8dd5cba1f75d9;p=youtube-dl [culturebox] Check for unavailable videos --- diff --git a/youtube_dl/extractor/francetv.py b/youtube_dl/extractor/francetv.py index 170d68075..20acc96bd 100644 --- a/youtube_dl/extractor/francetv.py +++ b/youtube_dl/extractor/francetv.py @@ -275,7 +275,12 @@ class CultureboxIE(FranceTVBaseInfoExtractor): def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) name = mobj.group('name') + webpage = self._download_webpage(url, name) + + if ">Ce live n'est plus disponible en replay<" in webpage: + raise ExtractorError('Video %s is not available' % name, expected=True) + video_id, catalogue = self._search_regex( r'"http://videos\.francetv\.fr/video/([^@]+@[^"]+)"', webpage, 'video id').split('@')