projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac651e9
)
[drtv] Check for unavailable videos
author
Sergey M․
<dstftw@gmail.com>
Sat, 4 Apr 2015 17:17:09 +0000
(23:17 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 4 Apr 2015 17:17:09 +0000
(23:17 +0600)
youtube_dl/extractor/drtv.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/drtv.py
b/youtube_dl/extractor/drtv.py
index 8257e35a437b075461114fbaf1b4dd2d578f56d8..bd1109549090c30fac218e046930e2f8938461ba 100644
(file)
--- a/
youtube_dl/extractor/drtv.py
+++ b/
youtube_dl/extractor/drtv.py
@@
-26,6
+26,10
@@
class DRTVIE(InfoExtractor):
webpage = self._download_webpage(url, video_id)
+ if '>Programmet er ikke længere tilgængeligt' in webpage:
+ raise ExtractorError(
+ 'Video %s is not available' % video_id, expected=True)
+
video_id = self._search_regex(
r'data-(?:material-identifier|episode-slug)="([^"]+)"',
webpage, 'video id')