projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed676e8
)
[culturebox] Check for unavailable videos
author
Sergey M․
<dstftw@gmail.com>
Sat, 4 Apr 2015 16:43:34 +0000
(22:43 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 4 Apr 2015 16:43:34 +0000
(22:43 +0600)
youtube_dl/extractor/francetv.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/francetv.py
b/youtube_dl/extractor/francetv.py
index 170d6807529ac9b121187786cf9329b3b3525dc3..20acc96bd9a67583bb4a64d4d5f5d5e2776a0cfe 100644
(file)
--- 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('@')