aboutsummaryrefslogtreecommitdiffstats
path: root/devscripts/make_lazy_extractors.py
diff options
context:
space:
mode:
authorMatthew <coletdjnz@protonmail.com>2023-01-01 04:29:22 +0000
committerGitHub <noreply@github.com>2023-01-01 04:29:22 +0000
commit8e40b9d1ec132ae1bcac50b3ee520ece46ac9c55 (patch)
tree910f1b931be45b9293dc763d9f46c33f7159c199 /devscripts/make_lazy_extractors.py
parent2fb0f858686c46abc50a0e253245afe750746775 (diff)
downloadhypervideo-pre-8e40b9d1ec132ae1bcac50b3ee520ece46ac9c55.tar.lz
hypervideo-pre-8e40b9d1ec132ae1bcac50b3ee520ece46ac9c55.tar.xz
hypervideo-pre-8e40b9d1ec132ae1bcac50b3ee520ece46ac9c55.zip
Improve plugin architecture (#5553)
to make plugins easier to develop and use: * Plugins are now loaded as namespace packages. * Plugins can be loaded in any distribution of yt-dlp (binary, pip, source, etc.). * Plugin packages can be installed and managed via pip, or dropped into any of the documented locations. * Users do not need to edit any code files to install plugins. * Backwards-compatible with previous plugin architecture. As a side-effect, yt-dlp will now search in a few more locations for config files. Closes https://github.com/yt-dlp/yt-dlp/issues/1389 Authored by: flashdagger, coletdjnz, pukkandan, Grub4K Co-authored-by: Marcel <flashdagger@googlemail.com> Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com> Co-authored-by: Simon Sawicki <accounts@grub4k.xyz>
Diffstat (limited to 'devscripts/make_lazy_extractors.py')
-rw-r--r--devscripts/make_lazy_extractors.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/devscripts/make_lazy_extractors.py b/devscripts/make_lazy_extractors.py
index c502bdf89..d74ea202f 100644
--- a/devscripts/make_lazy_extractors.py
+++ b/devscripts/make_lazy_extractors.py
@@ -40,8 +40,12 @@ def main():
_ALL_CLASSES = get_all_ies() # Must be before import
+ import yt_dlp.plugins
from yt_dlp.extractor.common import InfoExtractor, SearchInfoExtractor
+ # Filter out plugins
+ _ALL_CLASSES = [cls for cls in _ALL_CLASSES if not cls.__module__.startswith(f'{yt_dlp.plugins.PACKAGE_NAME}.')]
+
DummyInfoExtractor = type('InfoExtractor', (InfoExtractor,), {'IE_NAME': NO_ATTR})
module_src = '\n'.join((
MODULE_TEMPLATE,