]> jfr.im git - yt-dlp.git/commitdiff
Seperate import of lazy_extractors from that of normal extractors
authorpukkandan <redacted>
Thu, 28 Jan 2021 05:52:13 +0000 (11:22 +0530)
committerpukkandan <redacted>
Thu, 28 Jan 2021 05:55:42 +0000 (11:25 +0530)
This prevents "ModuleNotFoundError: No module named 'youtube_dl.extractor.lazy_extractors'" from appearing in the traceback

Related: https://github.com/animelover1984/youtube-dl/issues/17#issuecomment-757945024

youtube_dlc/extractor/__init__.py

index 56251384d8f822c003cc9b86fb61223ab446efa9..38f6df18167a9d7e2acb14b6969c004e8087a93b 100644 (file)
@@ -7,9 +7,10 @@
     from .lazy_extractors import _ALL_CLASSES
     _LAZY_LOADER = True
     _PLUGIN_CLASSES = []
-
 except ImportError:
     _LAZY_LOADER = False
+
+if not _LAZY_LOADER:
     from .extractors import *
 
     _PLUGIN_CLASSES = load_plugins('extractor', 'IE', globals())