How can I download subtitles of a list of videos using youtube-dl? I need an option for this. However I could not find an option to download only subtitles
There is an option, clearly mentioned in the documention:
--write-sub Write subtitle file --write-auto-sub Write automatic subtitle file (YouTube only) --all-subs Download all the available subtitles of the video --list-subs List all available subtitles for the video --sub-format FORMAT Subtitle format, accepts formats preference, for example: "srt" or "ass/srt/best" --sub-lang LANGS Languages of the subtitles to download (optional) separated by commas, use IETF language tags like 'en,pt'
So for example, to list all subs for a video:
youtube-dl --list-subs https://www.youtube.com/watch?v=Ye8mB6VsUHw
To download all subs, but not the video:
youtube-dl --all-subs --skip-download https://www.youtube.com/watch?v=Ye8mB6VsUHw
Another simple way to download subtitles from YouTube is to download Google2SRT. Google2SRT is a free, open source program for Windows, Mac and Linux that is able to download, save and convert multiple subtitles from YouTube videos.
Click the links to see screenshots of steps 1 and 2.
View the destination folder that was input in the SRT subtitles textbox to locate the SRT files.
Or you can only download one subtitle
youtube-dl --write-sub --sub-lang en --skip-download URL