A template plugin package repository is available at yt-dlp/yt-dlp-sample-plugins.
git clone git@github.com:YOUR_GITHUB_USERNAME/YOUR_REPOSITORY.git
yt_dlp_plugins/<type>
folder (where type is either extractor
or postprocessor
). See the sample plugins provided and the yt-dlp developer instructions for more details.
git
$ git add yt_dlp_plugins setup.cfg README.md
$ git commit -m 'Add yourplugin plugin'
$ git push origin master
yt-dlp-plugins
to the repository tags for discoverability.yt_dlp
Python module.yt_dlp_plugins
to PYTHONPATH
environment variable (this may not be necessary with some IDE run configurations).yt_dlp_plugins
folder should be automatically picked up by yt-dlp (run with -v
to check).from yt_dlp_plugins.extractor.example import ExampleIE
This works regardless of where the example
plugin is installed on the system, as long as yt-dlp can find it.
Your IDE may not be able to resolve the import, but it will work at runtime.
If the user does not have the example
plugin installed, the import will fail and your extractor will not be imported (but yt-dlp will continue to run).
The same applies for any other plugin type.
If you want your plugin to be installable with poetry, you can add the following to your pyproject.toml
:
[tool.poetry]
...
packages = [{ include = "yt_dlp_plugins" }]
...
See the Poetry documentation for more details.