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

Do API requests work over HTTP? #167

Closed afparsons closed 1 year ago

afparsons commented 1 year ago

As you've noted, some users have reported that their IP gets blocked after making some number of requests to the API.

I plan to experiment with AWS Lambda functions as a round-robin proxy pool.

I quickly pieced together an HTTP forward proxy in Rust. It seems to work for HTTP requests (I've only run it locally so far), but HTTPS doesn't work without me generating a certificate.

Do you know if the transcript API works over HTTP? I was getting errors when I attempted, but before I go digging, I wanted to ask if you had any insight.

jdepoix commented 1 year ago

Hi @afparsons, There's a section in the README describing how to use proxies. There you can pass in proxy settings which are passed through to the requests module. Therefore, you can check out the requests proxy documentation if you want to find out more about what to pass in. Does this help?

jdepoix commented 1 year ago

@afparsons did this help? Can I close this issue?

jdepoix commented 1 year ago

Closed due to inactivity

afparsons commented 1 year ago

Ah, sorry. This was part of a low-priority experimental side project and I never experimented further. I am aware of the proxy usage; my question was whether you knew if the API worked with *HTTP (not HTTPS) proxies.

But please keep this issue closed; if I continue with this and have additional questions, then I will open a new issue or discussion thread :slightly_smiling_face:

Vielen Dank!

jdepoix commented 1 year ago

Hi @afparsons, I know that people have used HTTP (over HTTPS) proxies in the past. YouTube might have started enforcing traffic to be HTTPS at some point. Please report back your findings if you ever get to play around with it more 😊