aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-04-04 22:43:34 +0600
committerSergey M․ <dstftw@gmail.com>2015-04-04 22:43:34 +0600
commit184a1974414bc91c5804251a33b8dd5cba1f75d9 (patch)
treee87d21f9bee560e901c15e7f232763a307cfdea4
parented676e8c0ab087acb8e5e26a2a8d94a47fe10c33 (diff)
[culturebox] Check for unavailable videos
-rw-r--r--youtube_dl/extractor/francetv.py5
1 files changed, 5 insertions, 0 deletions
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('@')