[ard] Show error message for videos that are no longer available (#3422)
authorSergey M․ <dstftw@gmail.com>
Sun, 10 Aug 2014 10:53:17 +0000 (17:53 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 10 Aug 2014 10:53:17 +0000 (17:53 +0700)
youtube_dl/extractor/ard.py

index 957bdefcbec7666473530815df9e3eb5dc88e096..7f0da8ab6d5b9f0e62f2af18c74c26185c505259 100644 (file)
@@ -51,6 +51,9 @@ class ARDIE(InfoExtractor):
 
         webpage = self._download_webpage(url, video_id)
 
+        if '>Der gewünschte Beitrag ist nicht mehr verfügbar.<' in webpage:
+            raise ExtractorError('Video %s is no longer available' % video_id, expected=True)
+
         title = self._html_search_regex(
             [r'<h1(?:\s+class="boxTopHeadline")?>(.*?)</h1>',
              r'<meta name="dcterms.title" content="(.*?)"/>',