Get Transcript from Youtube Video
- Subtitles
https://youtubetranscript.com website provides this service. and by inspecting the network I found that a GET request at for example: n https://youtubetranscript.com/?server_vid=ZAyhyVSIfmo returns an xml of the transcript (with start time and duration) of each text
The site now https://pypi.org/project/youtube-transcript-api/ instead because of bots increasing the site maintainence cost.
requests to use< Collapse code block
pip install youtube-transcript-api
< Collapse code block
from youtube_transcript_api import YouTubeTranscriptApi return YouTubeTranscriptApi.get_transcript("ZAyhyVSIfmo")