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__.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/hypervideo_dl/extractor/__init__.py b/hypervideo_dl/extractor/__init__.py
index 198c4ae..b354842 100644
--- a/hypervideo_dl/extractor/__init__.py
+++ b/hypervideo_dl/extractor/__init__.py
@@ -1,14 +1,15 @@
-from __future__ import unicode_literals
+import os
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
+_LAZY_LOADER = False
+if not os.environ.get('YTDLP_NO_LAZY_EXTRACTORS'):
+ try:
+ from .lazy_extractors import *
+ from .lazy_extractors import _ALL_CLASSES
+ _LAZY_LOADER = True
+ except ImportError:
+ pass
if not _LAZY_LOADER:
from .extractors import *
@@ -19,8 +20,8 @@ if not _LAZY_LOADER:
]
_ALL_CLASSES.append(GenericIE)
- _PLUGIN_CLASSES = load_plugins('extractor', 'IE', globals())
- _ALL_CLASSES = list(_PLUGIN_CLASSES.values()) + _ALL_CLASSES
+_PLUGIN_CLASSES = load_plugins('extractor', 'IE', globals())
+_ALL_CLASSES = list(_PLUGIN_CLASSES.values()) + _ALL_CLASSES
def gen_extractor_classes():