projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'sceext2-fix-iqiyi-2015-07-17'
[youtube-dl]
/
youtube_dl
/
extractor
/
megavideoz.py
diff --git
a/youtube_dl/extractor/megavideoz.py
b/youtube_dl/extractor/megavideoz.py
index d80f3633ec35ccfaaa2c3d81970910c96773582a..af7ff07ea1e5818c3e0c94511328fd26c2458657 100644
(file)
--- 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 (
from .common import InfoExtractor
from ..utils import (
+ ExtractorError,
float_or_none,
xpath_text,
)
float_or_none,
xpath_text,
)
@@
-31,6
+32,9
@@
class MegaVideozIE(InfoExtractor):
webpage = self._download_webpage(url, display_id)
webpage = self._download_webpage(url, display_id)
+ if any(p in webpage for p in ('>Video Not Found<', '>404 Error<')):
+ 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'),
config = self._download_xml(
self._search_regex(
r"var\s+cnf\s*=\s*'([^']+)'", webpage, 'cnf url'),