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.54k stars 279 forks source link

Cannot retrieve transcript from any video with subtles since June 7th #293

Closed gnx555 closed 2 weeks ago

gnx555 commented 3 weeks ago

DO NOT DELETE THIS! Please take the time to fill this out properly. I am not able to help you if I do not know what you are executing and what error messages you are getting. If you are having problems with a specific video make sure to include the video id.

To Reproduce

Steps to reproduce the behavior:

What code / cli command are you executing?

youtube_transcript_api iPcWRWH9mio

Which Python version are you using?

Python 3.9.8

Which version of youtube-transcript-api are you using?

youtube-transcript-api 0.6.2

Expected behavior

I expected to receive the english transcript

Actual behaviour

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

Question

Is YouTube blocking my server to retrieve transcript?

AliOsm commented 3 weeks ago

Facing the same issue.

Aubinga commented 3 weeks ago

Facing the same issue.

jonespm commented 2 weeks ago

This video is currently working fine for me on 2024-06-15

➜  ~ youtube_transcript_api "iPcWRWH9mio"
[[{'duration': 6.08,
   'start': 0.799,
   'text': "hi I'm lazy and I bet you are too no"},

I wonder if this is related to all the news in the last week about Youtube testing their new server-side ads with some users/regions? That feels like it's mostly a way to block LLM's and retrieval like this, as well as browser extensions.

jakerator commented 2 weeks ago

Can it be because of some IP blocks on youtube side?

acordier16 commented 2 weeks ago

Same issue here. Probably IP-banning from Google / YT. Having the issue on a Vultr server (Paris-located), but not from my home IP (Paris-located).