aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/common.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-10-23 14:38:03 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-10-23 14:38:03 +0200
commit55b3e45bbab3af5132d45c8f3f8f19fae5f5f1d9 (patch)
tree66ee276615c7e93408ae55e7cb9235fb3bb34817 /youtube_dl/extractor/common.py
parent365bcf6d975281ad769200cc8616872d0b6d6607 (diff)
downloadyoutube-dl-55b3e45bbab3af5132d45c8f3f8f19fae5f5f1d9.tar.xz
[vimeo] Fix pro videos and player.vimeo.com urls
The old process can still be used for those videos. Added RegexNotFoundError, which is raised by _search_regex if it can't extract the info.
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r--youtube_dl/extractor/common.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 7d7ce5d98..aaa5c24c8 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -14,6 +14,7 @@ from ..utils import (
clean_html,
compiled_regex_type,
ExtractorError,
+ RegexNotFoundError,
unescapeHTML,
)
@@ -231,7 +232,7 @@ class InfoExtractor(object):
Perform a regex search on the given string, using a single or a list of
patterns returning the first matching group.
In case of failure return a default value or raise a WARNING or a
- ExtractorError, depending on fatal, specifying the field name.
+ RegexNotFoundError, depending on fatal, specifying the field name.
"""
if isinstance(pattern, (str, compat_str, compiled_regex_type)):
mobj = re.search(pattern, string, flags)
@@ -251,7 +252,7 @@ class InfoExtractor(object):
elif default is not None:
return default
elif fatal:
- raise ExtractorError(u'Unable to extract %s' % _name)
+ raise RegexNotFoundError(u'Unable to extract %s' % _name)
else:
self._downloader.report_warning(u'unable to extract %s; '
u'please report this issue on http://yt-dl.org/bug' % _name)