mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-01 11:30:28 +01:00
Fix lazy extractor state (Fix 4445f37a7a66b248dbd8376c43137e6e441f138e) (#12452)
Authored by: coletdjnz, Grub4K, pukkandan
This commit is contained in:
parent
480125560a
commit
c034d65548
@ -5,12 +5,14 @@ from ..globals import LAZY_EXTRACTORS
|
|||||||
from ..globals import extractors as _extractors_context
|
from ..globals import extractors as _extractors_context
|
||||||
|
|
||||||
_CLASS_LOOKUP = None
|
_CLASS_LOOKUP = None
|
||||||
if not os.environ.get('YTDLP_NO_LAZY_EXTRACTORS'):
|
if os.environ.get('YTDLP_NO_LAZY_EXTRACTORS'):
|
||||||
|
LAZY_EXTRACTORS.value = False
|
||||||
|
else:
|
||||||
try:
|
try:
|
||||||
from .lazy_extractors import _CLASS_LOOKUP
|
from .lazy_extractors import _CLASS_LOOKUP
|
||||||
LAZY_EXTRACTORS.value = True
|
LAZY_EXTRACTORS.value = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
LAZY_EXTRACTORS.value = False
|
LAZY_EXTRACTORS.value = None
|
||||||
|
|
||||||
if not _CLASS_LOOKUP:
|
if not _CLASS_LOOKUP:
|
||||||
from . import _extractors
|
from . import _extractors
|
||||||
|
@ -27,4 +27,4 @@ plugin_ies_overrides = Indirect(defaultdict(list))
|
|||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
IN_CLI = Indirect(False)
|
IN_CLI = Indirect(False)
|
||||||
LAZY_EXTRACTORS = Indirect(False) # `False`=force, `None`=disabled, `True`=enabled
|
LAZY_EXTRACTORS = Indirect(None) # `False`=force, `None`=disabled, `True`=enabled
|
||||||
|
Loading…
x
Reference in New Issue
Block a user