url="https://www.youtube.com/watch?v=ZrQJaLemaoE"
yt-dlp --write-auto-sub --sub-lang en --skip-download $url
How can get the substitle with pure python script?
import yt_dlp
url="https://www.youtube.com/watch?v=ZrQJaLemaoE"
ydl_opts= {}
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
#some lines here to get the subtitle?