Reputation: 101
There are many ways to download youtube captions, but they do not work for autogenerated captions.
I can download autogenerated captions with yt-dlp, for example:
yt-dlp --skip-download --write-subs --write-auto-subs --sub-langs "ru-en" -P "/Users/user/Downloads" "https://youtu.be/PkZNo7MFNFg"
But how to do it without yt-dlp?
Upvotes: 0
Views: 2697
Reputation: 626
Try https://downsub.com. Seems to work just fine, and it lists all autogenerated subtitles by language.
Upvotes: 1
Reputation: 321
I don't know if you don't want to use yt-dlp
at all or if you don't want to use it just for downloading. You can use yt-dlp
to find the download address and then download the subtitles either with your browser or with wget
, for example.
To determine the URL, you must use the --dump-json
option which allows you to obtain all the information from the video.
yt-dlp --write-auto-subs "https://youtu.be/PkZNo7MFNFg" --dump-json > info.json
Edit this file, and go to the automatic_captions
section, then ru-en
and there you have the 5 download addresses for the 5 available formats.
For example for the vtt
format:
https://www.youtube.com/api/timedtext?v=PkZNo7MFNFg&ei=AsvXZdHVEo6zp-oPmtyE2AE&caps=asr&opi=112496729&xoaf=5&hl=en&ip=0.0.0.0&ipbits=0&expire=1708666226&sparams=ip%2Cipbits%2Cexpire%2Cv%2Cei%2Ccaps%2Copi%2Cxoaf&signature=09860E14932DDDAB486742638E9A499216DE19AE.B300E3CDF4AC749907DF14051439C79790542CC1&key=yt8&lang=en&tlang=ru-en&fmt=vtt
You can download it with wget
:
wget "https://www.youtube.com/api/timedtext?v=PkZNo7MFNFg&ei=AsvXZdHVEo6zp-oPmtyE2AE&caps=asr&opi=112496729&xoaf=5&hl=en&ip=0.0.0.0&ipbits=0&expire=1708666226&sparams=ip%2Cipbits%2Cexpire%2Cv%2Cei%2Ccaps%2Copi%2Cxoaf&signature=09860E14932DDDAB486742638E9A499216DE19AE.B300E3CDF4AC749907DF14051439C79790542CC1&key=yt8&lang=en&tlang=ru-en&fmt=vtt"
or directly in the browser.
Upvotes: 0