diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2016-02-10 13:16:18 +0100 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2016-04-08 21:43:24 +0200 |
commit | e52d7f85f25e806527d7b618d8c3ad16d27681f4 (patch) | |
tree | 7cd479639805ee4d4ac25fb4133a9be2a7636c61 /youtube_dl/extractor/__init__.py | |
parent | 568d2f78d635c3993e95334b9f8f6d2b47ecee51 (diff) |
Delay initialization of InfoExtractors until they are needed
Diffstat (limited to 'youtube_dl/extractor/__init__.py')
-rw-r--r-- | youtube_dl/extractor/__init__.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py index c3121d83c..cd1f116e2 100644 --- a/youtube_dl/extractor/__init__.py +++ b/youtube_dl/extractor/__init__.py @@ -997,11 +997,18 @@ _ALL_CLASSES = [ _ALL_CLASSES.append(GenericIE) +def gen_extractor_classes(): + """ Return a list of supported extractors. + The order does matter; the first extractor matched is the one handling the URL. + """ + return _ALL_CLASSES + + def gen_extractors(): """ Return a list of an instance of every supported extractor. The order does matter; the first extractor matched is the one handling the URL. """ - return [klass() for klass in _ALL_CLASSES] + return [klass() for klass in gen_extractor_classes()] def list_extractors(age_limit): |