diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-04-19 04:09:01 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-04-19 04:09:01 +0600 |
commit | 6e218b3f9a57f42756aa3016fa9dd530fb58c452 (patch) | |
tree | b60acf97f442e66a9c3645cedf0f4c720beb50c9 /youtube_dl/extractor/megavideoz.py | |
parent | cc9b9df0b680da1cf610da57fbf397d8ebd75e74 (diff) |
[megavideoz] Check non-existing videos
Diffstat (limited to 'youtube_dl/extractor/megavideoz.py')
-rw-r--r-- | youtube_dl/extractor/megavideoz.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/extractor/megavideoz.py b/youtube_dl/extractor/megavideoz.py index d80f3633e..a15b6a32a 100644 --- a/youtube_dl/extractor/megavideoz.py +++ b/youtube_dl/extractor/megavideoz.py @@ -5,6 +5,7 @@ import re from .common import InfoExtractor from ..utils import ( + ExtractorError, float_or_none, xpath_text, ) @@ -31,6 +32,9 @@ class MegaVideozIE(InfoExtractor): webpage = self._download_webpage(url, display_id) + if '>Video Not Found<' in webpage: + raise ExtractorError('Video %s does not exist' % video_id, expected=True) + config = self._download_xml( self._search_regex( r"var\s+cnf\s*=\s*'([^']+)'", webpage, 'cnf url'), |