Browse Source

[veehd] Capture removed video message

totalwebcasting
Sergey M․ 10 years ago
parent
commit
d5bb814d34
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      youtube_dl/extractor/veehd.py

+ 5
- 0
youtube_dl/extractor/veehd.py View 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')


Loading…
Cancel
Save