-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TranscriptsDisabled But it's not disabled (works locally, fails on Cloud machine) #303
Comments
Yes the issue is valid, but it seems that this does not show with the link, which Youtube gave us when we use the link from Share button. |
Hi @atoonk, do you only have this issue with this specific video, or all videos you are trying to retrieve? I can retrieve the subtitles for that video without any issues, which usually means that you are being rate-limited by YouTube (which would also mean that this should happen for all videos). |
Hi @jdepoix, I encountered the same problem yesterday with every video I tried. Although I don't use the API frequently, I do access it a few times per day. I hope it's not some new restriction from YouTube. I experienced the same problem as @atoonk, and the issue is still present today. Thanks a lot for your quick response and for this amazing tool; I really like it. |
Hi @SKVNDR, then you're most definitely being blocked by YouTube. The only way to work around this is to change your IP address in any way (VPN, proxy, or assign a new IP if possible). |
I can confirm that YouTube is most likely blocking =/ |
If you're running your code on a cloud machine it could be that (depending on your setup) you're getting assigned an IP from a pool that is shared with other machines. So the IP you're using could potentially be blocked without you doing anything. YouTube could also generally black list certain IPs that are known to belong to cloud providers (just a guess, I don't know if they actually do that!). |
Ah yes, i tried it from my laptop at home and it works fine now. And indeed, it affected all videos, which I why I thought it was a bug or new behaviour in YT api. |
Since this is not an official API, there unfortunately is no information on rate limits and when or for how long you will get blocked. People have been reporting different things, so I don't feel like it is consistent either. |
I will pin this issue and leave it open, since there are issues being opened due to this all the time. |
Same for me. I use a droplet on DigitalOcean, and YouTube probably blocked the IP from there, but using a proxy fixed the issue... |
how did you create a proxy can you share the code. did you use a free proxy or paid? how did you obtain that proxy? |
Hi @auspy, from youtube_transcript_api import YouTubeTranscriptApi
YouTubeTranscriptApi.get_transcript(video_id, proxies={"https": "https://user:pass@domain:port"}) I'm using a paid proxy from smartproxy.com with the "Residential" offer. |
confirmed, using a proxy from my droplet worked. I used this to proxy traffic from my digital ocean droplet to my local laptop. https://docs.border0.com/docs/expose-a-http-proxy
can make a more details quick video if folks are interested in how to use that. |
Having the exact same issue, & also using DigitalOcean droplet |
sure would love a video on it. drop the link here |
thank you for sharing. this surely looks like a cheap option but I was looking for something free. don't want to pay in initial stages of my project. |
@auspy Would Appreciate a vid. or just more info. ::: I'm all new to proxies etc. seems most info. online is kinda for the more experienced ::: |
Just ran across this issue today, glad I found this thread. I too am on Digital Ocean, running my code in a Docker container. Getting transcripts runs fine locally, but not on DO. I would appreciate the video mentioned above, as proxies are new to me. If I use my localhost as a proxy, it means I need to leave the machine running 24/7 right? I mean, I guess that's obvious. |
Yep, same with me -- looks like youtube blocked many DO servers at once -- i didn't spent so much requests and I'm banned. |
I also use Digital Ocean droplet, i think they block IPs from DO servers. now I using google cloud functions. |
I can confirm that it is a problem with digital ocean servers being blocked. |
Now this error also in google cloud functions. |
Blocked from dedicated OVH too |
Has anyone faced same issue on pythonanywhere? |
faced the same issue today in aws ec2 |
same issue today on aws lambda |
Are you able to Run on AWS Lambda , how you have done this ? |
Seems APIfy just increased their price on the transcript actor dramatically. So it's not viable even for hobby/personally use since it's a $19.99/mo flat fee. |
Just tested by setting up a GCP Func (deployed in US region). This doesn't work, if was ever working... |
Yeah seems YT is very aggressive with IP blacklists. Wouldn't be surprised if they they do the same to proxies, too. What we need is a good way auth so that requests to transcripts aren't anon. |
Funny thing: some videos work with proxies just fine.. but some popular ones don't work with a single proxy I use from a list of 20.. But yet, there is no official lib or API from YT itself for this. So not sure where you'd like to authenticate to? |
I thought if you made the request with the correct token, YT wouldn't block the transcript request. I imagine that's what APIFy does behind the scenes. |
No no, I tested the scraper to be ran from GCP, as was claimed above. This doesn't work. Being blocked like from any other cloud/hoster. |
late reply but I tried, waste of time... you need to set up Oauth and after that, for my surprise, seems like only videos that have third party collaboration enabled, are the ones that you can downlaod the subtitles. what I think is quite a small percentage of videos. I wasnt able to download any subtitles. But I was able to get the transcript list with youtube api, only that. |
Went down a rabbit hole and ended up here. Thanks for these solutions. I am now having success using Smart Proxy. |
Hi, I'm also using Render and smartproxy. How did you get it working? I'm currently using the proxy and still getting the same error. Code is here: main.py |
I am also facing the same error when using this library from huggingface. |
Yep managed to fix it. Unfortunately it will require proxies, but the error was an SSL authentication error, if you haven't done so already generate a new password for your proxies. The default password was stale and just had to put in a new one. If it's a personal project, you can get 1GB of request bandwidth from smartproxy for $7, which will last you for ages. |
I've tried with Webshare and smartproxy and still have no luck getting it to work...for those of you using smartproxy was there anything in particular that you had to do? |
What's the error you're getting? |
That worked! Thanks a ton! |
I've bought a resedential proxy on smartproxy and yet it doesnt work for me - Please help. |
If you've tried all of the above and it still doesn't work, set the session type to Rotating instead of Sticky. |
In smart proxy I''m getting |
To Reproduce
using youtube-transcript-api-0.6.2:
outputs:
What code / cli command are you executing?
I am running
Which Python version are you using?
Python 3.11.6
Which version of youtube-transcript-api are you using?
youtube-transcript-api-0.6.2
Expected behavior
Describe what you expected to happen.

I expected to receive the english transcript
I can see it in browser, see screenshot:
Actual behaviour
The text was updated successfully, but these errors were encountered: