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

TranscriptsDisabled exception #128

Closed dankeinan1 closed 3 years ago

dankeinan1 commented 3 years ago

Hi, I am trying to use this API to get the manually created transcript in Hebrew of YouTube videos. I am using these code: transcript_list = YouTubeTranscriptApi.list_transcripts([video_id]) transcript = transcript_list.find_manually_created_transcript(['he'])

I tried it with many different videos with manually created captions, one video for example: https://www.youtube.com/watch?v=i5_5gGimcio I also tried 'iw' for the language code.

I keep getting the TranscriptsDisabled exception. What am I doing wrong?

jdepoix commented 3 years ago

Hi @dankeinan1, list_transcripts() should receive a single video id instead of a list of video ids. The name is pluralized because it returns multiple transcripts not because it takes multiple inputs 😊 I realise that a lot of people get confused with input types, that why I am planning to add type assertions in #125. I will close this for now, let me know if you're still having issues.