]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube_dl/extractor/__init__.py
Add experimental support for lazy loading the info extractors
[youtube-dl.git] / youtube_dl / extractor / __init__.py
index a0a53445a5b32563f6ade427d8a3ae0ee74d43aa..b0d4d156b411e29cec6803b181bfacc0a87262b7 100644 (file)
@@ -1,13 +1,17 @@
 from __future__ import unicode_literals
 
-from .extractors import *
-
-_ALL_CLASSES = [
-    klass
-    for name, klass in globals().items()
-    if name.endswith('IE') and name != 'GenericIE'
-]
-_ALL_CLASSES.append(GenericIE)
+try:
+    from .lazy_extractors import *
+    from .lazy_extractors import _ALL_CLASSES
+except ImportError:
+    from .extractors import *
+
+    _ALL_CLASSES = [
+        klass
+        for name, klass in globals().items()
+        if name.endswith('IE') and name != 'GenericIE'
+    ]
+    _ALL_CLASSES.append(GenericIE)
 
 
 def gen_extractor_classes():