UP | HOME

Date: [2022-07-22 Fri]

Get Transcript from Youtube Video

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 [2023-08-09 Wed] requests to use https://pypi.org/project/youtube-transcript-api/ instead because of bots increasing the site maintainence cost.

< Collapse code block> Expand code block
pip install youtube-transcript-api
< Collapse code block> Expand code block
from youtube_transcript_api import YouTubeTranscriptApi

return YouTubeTranscriptApi.get_transcript("ZAyhyVSIfmo")

You can send your feedback, queries here