1
0
Fork 0
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:
Simon Sawicki 2025-02-23 09:44:27 +01:00 committed by GitHub
parent 480125560a
commit c034d65548
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -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

View file

@ -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