Jun-28-2022, 04:25 PM
Hello,
Does exist some document that explain how to use yt-dlp options in Python.
There are a lot of options an it's more or less clear how to use it when using tool from command line.
With Python, these options seem less obvious.
For example when I want to download just subtitles (not video) I use this command:
yt-dlp --write-sub --sub-lang fr --skip-download https://www.arte.tv/fr/videos/104769-000...almodovar/
... and it works - only subtitles file is downloaded.
When I try to use skip-download in Python, it doesn't work.
This code downloads both subtitles and video.
Does exist some document that explain how to use yt-dlp options in Python.
There are a lot of options an it's more or less clear how to use it when using tool from command line.
With Python, these options seem less obvious.
For example when I want to download just subtitles (not video) I use this command:
yt-dlp --write-sub --sub-lang fr --skip-download https://www.arte.tv/fr/videos/104769-000...almodovar/
... and it works - only subtitles file is downloaded.
When I try to use skip-download in Python, it doesn't work.
This code downloads both subtitles and video.
import yt_dlp links = 'https://www.arte.tv/fr/videos/104769-000-A/antonio-banderas-et-pedro-almodovar/' ydl_opts = {'writesubtitles': True, 'skip-download': True} with yt_dlp.YoutubeDL(ydl_opts) as ydl: ydl.download([links])