aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/veehd.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-01-11 15:42:53 +0600
committerSergey M․ <dstftw@gmail.com>2015-01-11 15:42:53 +0600
commitd5bb814d348558a9700f9d8d2a063a2de2de4274 (patch)
tree0fae78f5f599d760e86c05c44c1a255812418fae /youtube_dl/extractor/veehd.py
parentd156a1d981b2773e1c35c9eb7d9b9a3bbcea7c96 (diff)
[veehd] Capture removed video message
Diffstat (limited to 'youtube_dl/extractor/veehd.py')
-rw-r--r--youtube_dl/extractor/veehd.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/extractor/veehd.py b/youtube_dl/extractor/veehd.py
index 815f58468..4f76ca403 100644
--- a/youtube_dl/extractor/veehd.py
+++ b/youtube_dl/extractor/veehd.py
@@ -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')