Skip to content
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

Proxy works on local but not works on server #379

Closed
tahmasebi opened this issue Jan 29, 2025 · 3 comments
Closed

Proxy works on local but not works on server #379

tahmasebi opened this issue Jan 29, 2025 · 3 comments

Comments

@tahmasebi
Copy link

I use the same line of command in the terminal in both environment and check the proxy provider log.

Both systems are Ubuntu, and using same version of youtube-transcript-api on both

the command is:

~/venv/bin/youtube_transcript_api QmwmqMxBxew --http-proxy http://customer-***B7:gt**[email protected]:10000 --languages en

It works on local but not works on server.
I'm just wondering why the same proxy result, on local and server, is different.

The error on server, "Subtitles are disabled for this video";

I'm checking the proxy requests log on the provider panel, and I can see the request is routing from proxy when I'm in local machine. But there is not any request log there when I'm on the server.

@jdepoix
Copy link
Owner

jdepoix commented Jan 30, 2025

Hi @tahmasebi!

YouTube is accessed via HTTPS, not HTTP. Therefore, you will have to provide a HTTPS proxy for it to work!

The reason it's working locally is because your local IP isn't blocked. It would probably also work locally without a proxy.

@jdepoix jdepoix closed this as completed Jan 30, 2025
@drorata
Copy link

drorata commented Feb 1, 2025

I could use some hints here... First, @jdepoix thanks for the nice package!! It works locally smoothly which is great. The problem is that once deployed I can no longer use it and the API doesn't return a result. So do I understand correctly and I need to setup a proxy? How can I tell that the proxy won't be blocked by YouTube? Currently, the app which uses the package is deployed using DigitalOcean, so I guess it already uses some IP which is blocked... I'm a little lost.

@jdepoix
Copy link
Owner

jdepoix commented Feb 3, 2025

Hi @drorata! Have a look at #303. There is a lot of information around this topic over there. Generally speaking, there is no way to avoid that a proxy IP will be blocked as well, so the only thing you can do is cycle through a pool of IPs as they get blocked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants