aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'hypervideo_dl/extractor/__init__.py')
-rw-r--r--hypervideo_dl/extractor/__init__.py9
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.