youtube-transcript-api icon indicating copy to clipboard operation
youtube-transcript-api copied to clipboard

Update for cloud deployment

Open jbowen28 opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. Does not work when deployed to cloud. Cloud server (Vercel) says: 'Could not retrieve a transcript for the video ... This is most likely caused by: Subtitles are disabled for this video.'

Describe the solution you'd like Be able to download youtube captions from a cloud server.

Describe alternatives you've considered Runs on localhost only.

Additional context Maybe change http request headers to indicate localhost for x-forwarded-host, x-forwarded-for, and host. But this might get overwritten my cloud server.

jbowen28 avatar Mar 12 '25 01:03 jbowen28

Hi @jbowen28 ,

this issue has already been reported and discussed at length in #303. The short answer is that your IP is being blocked by YouTube.

I have just released v1.0.0 which adds a more explicit exception type and error message when this happens. Also, there now is a new section in the README called Working around IP bans, that explains how to work around being IP blocked by YouTube!

jdepoix avatar Mar 12 '25 08:03 jdepoix