aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-11-30 03:58:39 +0600
committerSergey M․ <dstftw@gmail.com>2015-11-30 03:58:39 +0600
commitaf284305d58a9915a8ef00d056484b3a59548dda (patch)
tree63217700c204b0fcd87c552e4f517ce565e59c5a /youtube_dl/extractor
parentd53a4af1a49413a38d639aeb7f522c4ebff8f5c8 (diff)
[vodlocker] Capture file not found error (Closes #7696)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/vodlocker.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/youtube_dl/extractor/vodlocker.py b/youtube_dl/extractor/vodlocker.py
index be0a2780f..357594a11 100644
--- a/youtube_dl/extractor/vodlocker.py
+++ b/youtube_dl/extractor/vodlocker.py
@@ -3,11 +3,14 @@ from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import compat_urllib_parse
-from ..utils import sanitized_Request
+from ..utils import (
+ ExtractorError,
+ sanitized_Request,
+)
class VodlockerIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?vodlocker\.com/(?P<id>[0-9a-zA-Z]+)(?:\..*?)?'
+ _VALID_URL = r'https?://(?:www\.)?vodlocker\.com/(?:embed-)?(?P<id>[0-9a-zA-Z]+)(?:\..*?)?'
_TESTS = [{
'url': 'http://vodlocker.com/e8wvyzz4sl42',
@@ -24,6 +27,12 @@ class VodlockerIE(InfoExtractor):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
+ if any(p in webpage for p in (
+ '>THIS FILE WAS DELETED<',
+ '>File Not Found<',
+ 'The file you were looking for could not be found, sorry for any inconvenience.<')):
+ raise ExtractorError('Video %s does not exist' % video_id, expected=True)
+
fields = self._hidden_inputs(webpage)
if fields['op'] == 'download1':