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.55k stars 280 forks source link

disabled #215

Closed Nitesh-2002 closed 12 months ago

Nitesh-2002 commented 12 months ago

TranscriptsDisabled: Could not retrieve a transcript for the video https://www.youtube.com/watch?v=UBBl0IiaJ1E! 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!

filimo commented 12 months ago

Same issue on youtube-transcript-api-0.6.1

transcript_list = YouTubeTranscriptApi.list_transcripts('KWfKwvTQ')
Exception has occurred: TranscriptsDisabled

Could not retrieve a transcript for the video https://www.youtube.com/watch?v=KWfKwvTQ! 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!
  File "/Users/filimo/MyProjects/AI/download_youtube_subtitles.py", line 22, in get_transcript
    transcript_list = YouTubeTranscriptApi.list_transcripts(video_id)
  File "/Users/filimo/MyProjects/AI/download_youtube_subtitles.py", line 83, in <module>
    transcript = get_transcript(args.video_id, args.subtitle_language)
youtube_transcript_api._errors.TranscriptsDisabled: 
Could not retrieve a transcript for the video https://www.youtube.com/watch?v=KWfKwvTQ! 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 
jdepoix commented 12 months ago

@Nitesh-2002 as the error message indicates, this is because subtitles are disabled for this video @filimo The video which you posted seems to be no longer available on YouTube

filimo commented 12 months ago

@jdepoix Sorry this is my mistake I have not copied the ID completely. With the correct id, everything works fine. Thank you for your quick response