1
mirror of https://github.com/yt-dlp/yt-dlp synced 2024-12-12 16:03:55 +01:00

[culturebox] Check for unavailable videos

This commit is contained in:
Sergey M․ 2015-04-04 22:43:34 +06:00
parent ed676e8c0a
commit 184a197441

View File

@ -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('@')