diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-12-30 19:35:35 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-12-30 19:35:35 +0100 |
commit | 416c7fcbce86324587afae11414c71ff603ad296 (patch) | |
tree | 57cf7d7794165b0354541ffaed04e8a22041a0f4 /youtube_dl | |
parent | 7fc2cd819e10ca6c69cb3601c0bbe7d577256da7 (diff) |
Add documentation about supported sites (Fixes #4503)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/generic.py | 3 | ||||
-rw-r--r-- | youtube_dl/utils.py | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 2b4d8c62f..40b2791c7 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -23,6 +23,7 @@ from ..utils import ( unescapeHTML, unified_strdate, unsmuggle_url, + UnsupportedError, url_basename, ) from .brightcove import BrightcoveIE @@ -1057,7 +1058,7 @@ class GenericIE(InfoExtractor): 'url': new_url, } if not found: - raise ExtractorError('Unsupported URL: %s' % url) + raise UnsupportedError(url) entries = [] for video_url in found: diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 43b7c94ba..efbe64fb3 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -464,6 +464,13 @@ class ExtractorError(Exception): return ''.join(traceback.format_tb(self.traceback)) +class UnsupportedError(ExtractorError): + def __init__(self, url): + super(UnsupportedError, self).__init__( + 'Unsupported URL: %s' % url, expected=True) + self.url = url + + class RegexNotFoundError(ExtractorError): """Error when a regex didn't match""" pass |