From: Sergey M․ Date: Sat, 4 Apr 2015 17:17:09 +0000 (+0600) Subject: [drtv] Check for unavailable videos X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=aff84bec07fc1919591827543845790074b0194f;p=youtube-dl [drtv] Check for unavailable videos --- 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')