mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-09 12:50:23 -05:00
Fix lazy extractor state (Fix 4445f37a7a
) (#12452)
Authored by: coletdjnz, Grub4K, pukkandan
This commit is contained in:
parent
480125560a
commit
c034d65548
2 changed files with 5 additions and 3 deletions
|
@ -5,12 +5,14 @@
|
|||
from ..globals import extractors as _extractors_context
|
||||
|
||||
_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:
|
||||
from .lazy_extractors import _CLASS_LOOKUP
|
||||
LAZY_EXTRACTORS.value = True
|
||||
except ImportError:
|
||||
LAZY_EXTRACTORS.value = False
|
||||
LAZY_EXTRACTORS.value = None
|
||||
|
||||
if not _CLASS_LOOKUP:
|
||||
from . import _extractors
|
||||
|
|
|
@ -27,4 +27,4 @@ def __repr__(self, /):
|
|||
|
||||
# Misc
|
||||
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…
Reference in a new issue