jdepoix / youtube-transcript-api

This is a python API which allows you to get the transcript/subtitles for a given YouTube video. It also works for automatically generated subtitles and it does not require an API key nor a headless browser, like other selenium based solutions do!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get auto-generated subtitles even when both the (manually created) and (auto-generated) subtitles exists.

nodelike opened this issue · comments

I want to select the (GENERATED) subtitle instead of (MANUALLY CREATED) when I run the following line in python:

YouTubeTranscriptApi.get_transcript(video_id, languages=["en"])

YouTubeTranscriptApi.list_transcripts(video_id) returns this list of subtitles:

For this video (N2bXEUSAiTI&list=PLBjE6akKYpgiFB-X-WL4oOU4GyVZGYwio) transcripts are available in the following languages:

(MANUALLY CREATED)
 - en ("English - Twitch Chat")[TRANSLATABLE]

(GENERATED)
 - en ("English (auto-generated)")[TRANSLATABLE]

I am trying to get the subtitles of this video(ID): N2bXEUSAiTI&list=PLBjE6akKYpgiFB-X-WL4oOU4GyVZGYwio

Hi @SenpaiKishore, please read the docs on this.