Closed d33tah closed 1 year ago
The yt-dlp binary is not changed. As Python is a highly dynamic language, we make use of imported python objects and alter them at runtime. You can take a look at ytdlp_plugins/patching.py for the methods we use.
@flashdagger Thanks! I guess my question is: if I run yt-dlp, what makes this library get pulled in at runtime?
If you run yt-dlp
no third party code will get pulled in. That's why this project has it's own executable ytdlp-plugins
. That's where the plugins are injected.
Thanks, that answers the question for me. Closing the issue :) Have a great day!
Nie ma za co 😄
Thanks for creating this project! I'm curious how it works - specifically, what makes it affect the list of extractors that yt-dlp can see. Could you point me to the piece of code (or setup configuration) that extends an already installed yt-dlp binary, adding new code? I could use this monkey-patching capability in other projects too.