projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc9b9df
)
[megavideoz] Check non-existing videos
author
Sergey M․
<dstftw@gmail.com>
Sat, 18 Apr 2015 22:09:01 +0000
(
04:09
+0600)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 18 Apr 2015 22:09:01 +0000
(
04:09
+0600)
youtube_dl/extractor/megavideoz.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/megavideoz.py
b/youtube_dl/extractor/megavideoz.py
index d80f3633ec35ccfaaa2c3d81970910c96773582a..a15b6a32acf4f318d6c861f85cc82feacce5002d 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 (
+ 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'),