diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 65675e859..84d5b5bc2 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -179,6 +179,8 @@ from .version import CHANNEL, ORIGIN, RELEASE_GIT_HEAD, VARIANT, __version__ if compat_os_name == 'nt': import ctypes +__all__ = ['YoutubeDL'] + def _catch_unsafe_extension_error(func): @functools.wraps(func) diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index 1c8727504..c681bb3de 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -22,7 +22,7 @@ import urllib.parse import urllib.request import xml.etree.ElementTree -from .._globals import plugin_overrides +from .._globals import plugin_overrides as _plugin_overrides from ..compat import ( compat_etree_fromstring, compat_expanduser, @@ -3941,13 +3941,13 @@ class InfoExtractor: while getattr(super_class, '__wrapped__', None): super_class = super_class.__wrapped__ - if not any(override.PLUGIN_NAME == plugin_name for override in plugin_overrides.get()[super_class]): + if not any(override.PLUGIN_NAME == plugin_name for override in _plugin_overrides.get()[super_class]): cls.__wrapped__ = next_mro_class cls.PLUGIN_NAME, cls.ie_key = plugin_name, next_mro_class.ie_key cls.IE_NAME = f'{next_mro_class.IE_NAME}+{plugin_name}' setattr(sys.modules[super_class.__module__], super_class.__name__, cls) - plugin_overrides.get()[super_class].append(cls) + _plugin_overrides.get()[super_class].append(cls) return super().__init_subclass__(**kwargs)