[youtube] Fix extraction.
[youtube-dl] / youtube_dl / extractor / __init__.py
index a0a53445a5b32563f6ade427d8a3ae0ee74d43aa..18d8dbcd6672f82776a9bd9f6f4cc63cac91129d 100644 (file)
@@ -1,13 +1,19 @@
 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
+    _LAZY_LOADER = True
+except ImportError:
+    _LAZY_LOADER = False
+    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():