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!
MIT License
2.87k stars 326 forks source link

Generating transcripts using YouTube-transcript-api #165

Closed rohitsanam closed 1 year ago

rohitsanam commented 1 year ago

I am having video id's for multiple videos of a playlist when I am trying to extract th transcript I am getting the following error:

TranscriptsDisabled: Could not retrieve a transcript for the video https://www.youtube.com/watch?v=b! This is most likely caused by:

Subtitles are disabled for this video

If you are sure that the described cause is not responsible for this error and that a transcript should be retrievable, please create an issue at https://github.com/jdepoix/youtube-transcript-api/issues. Please add which version of youtube_transcript_api you are using and provide the information needed to replicate the error. Also make sure that there are no open issues which already describe your problem!

version of YouTube-transcript-api:0.4.4

jdepoix commented 1 year ago

Hello @rohitsanam, please supply the code you are executing. My guess is, that you are using get_transcripts instead of get_transcript. When using get_transcripts you need to pass in a list of strings and when using get_transcript you must pass in a string.

jdepoix commented 1 year ago

closed due to inactivity