]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[veehd] Capture removed video message
authorSergey M․ <dstftw@gmail.com>
Sun, 11 Jan 2015 09:42:53 +0000 (15:42 +0600)
committerSergey M․ <dstftw@gmail.com>
Sun, 11 Jan 2015 09:42:53 +0000 (15:42 +0600)
youtube_dl/extractor/veehd.py

index 815f5846804a3cebcf716d8d20b6373e44fd14fd..4f76ca403ae526b45c8093519639efee2f9d1f7e 100644 (file)
@@ -8,6 +8,7 @@ from ..compat import (
     compat_urlparse,
 )
 from ..utils import (
+    ExtractorError,
     clean_html,
     get_element_by_id,
 )
@@ -34,6 +35,10 @@ class VeeHDIE(InfoExtractor):
         # See https://github.com/rg3/youtube-dl/issues/2102
         self._download_webpage(url, video_id, 'Requesting webpage')
         webpage = self._download_webpage(url, video_id)
+
+        if 'This video has been removed<' in webpage:
+            raise ExtractorError('Video %s has been removed' % video_id, expected=True)
+
         player_path = self._search_regex(
             r'\$\("#playeriframe"\).attr\({src : "(.+?)"',
             webpage, 'player path')