diff options
author | Jesús <heckyel@hyperbola.info> | 2021-10-18 15:24:21 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-10-18 15:24:21 -0500 |
commit | 5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e (patch) | |
tree | 65209bc739db35e31f1c9b5b868eb5df4fe12ae3 /hypervideo_dl/extractor/__init__.py | |
parent | 27fe903c511691c078942bef5ee9a05a43b15c8f (diff) | |
download | hypervideo-5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e.tar.lz hypervideo-5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e.tar.xz hypervideo-5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e.zip |
update from upstream
Diffstat (limited to 'hypervideo_dl/extractor/__init__.py')
-rw-r--r-- | hypervideo_dl/extractor/__init__.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hypervideo_dl/extractor/__init__.py b/hypervideo_dl/extractor/__init__.py index 18d8dbc..198c4ae 100644 --- a/hypervideo_dl/extractor/__init__.py +++ b/hypervideo_dl/extractor/__init__.py @@ -1,13 +1,17 @@ from __future__ import unicode_literals +from ..utils import load_plugins + try: from .lazy_extractors import * from .lazy_extractors import _ALL_CLASSES _LAZY_LOADER = True + _PLUGIN_CLASSES = {} except ImportError: _LAZY_LOADER = False - from .extractors import * +if not _LAZY_LOADER: + from .extractors import * _ALL_CLASSES = [ klass for name, klass in globals().items() @@ -15,6 +19,9 @@ except ImportError: ] _ALL_CLASSES.append(GenericIE) + _PLUGIN_CLASSES = load_plugins('extractor', 'IE', globals()) + _ALL_CLASSES = list(_PLUGIN_CLASSES.values()) + _ALL_CLASSES + def gen_extractor_classes(): """ Return a list of supported extractors. |