about summary refs log tree commit diff
path: root/youtube_dl/extractor/drtv.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-04-04 23:17:09 +0600
committerSergey M․ <dstftw@gmail.com>2015-04-04 23:17:09 +0600
commitaff84bec07fc1919591827543845790074b0194f (patch)
treed250fdf657a8d54ef16401358024c3019ccc9003 /youtube_dl/extractor/drtv.py
parentac651e974ef8da74df35e5ac5464cc03e35bb2d1 (diff)
downloadyoutube-dl-aff84bec07fc1919591827543845790074b0194f.tar.gz
youtube-dl-aff84bec07fc1919591827543845790074b0194f.tar.xz
youtube-dl-aff84bec07fc1919591827543845790074b0194f.zip
[drtv] Check for unavailable videos
Diffstat (limited to 'youtube_dl/extractor/drtv.py')
-rw-r--r--youtube_dl/extractor/drtv.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/extractor/drtv.py b/youtube_dl/extractor/drtv.py
index 8257e35a4..bd1109549 100644
--- 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')