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

Failed to perform an HTTP request to YouTube because of rate limiting #376

Closed
satish2832 opened this issue May 11, 2020 · 13 comments
Closed
Labels

Comments

@satish2832
Copy link

Failed to perform an HTTP request to YouTube because of rate limiting. This error indicates that YouTube thinks there were too many requests made from this IP and considers it suspicious. To resolve this error, please wait some time and try again -or- try injecting an HttpClient that has cookies for an authenticated user.

@satish2832
Copy link
Author

Any suggestions to overcome this issue ?

@Tyrrrz
Copy link
Owner

Tyrrrz commented May 11, 2020

All of the suggestions are in the error message.

@Tyrrrz Tyrrrz changed the title Issue Failed to perform an HTTP request to YouTube because of rate limiting Failed to perform an HTTP request to YouTube because of rate limiting May 11, 2020
@ComputerMaster1st
Copy link

ComputerMaster1st commented May 11, 2020

Hi There,

I have a question. Any ideas what cookies should be used? There's a lot of cookies and I'm unsure which ones we should try using to inject into the httpclient.

@Tyrrrz
Copy link
Owner

Tyrrrz commented May 11, 2020

Not sure, haven't tried it myself. You can try using all of them.

@ComputerMaster1st
Copy link

ComputerMaster1st commented May 11, 2020

https://i.gyazo.com/8b37f07d9aeaed050b1cc23df0f843d4.png << Here's a screenshot of what cookies are available to me. This is my own account though. I plan to make a separate account to test with.

I think we need to use the following cookies based on their expiry time >> https://i.gyazo.com/c61ac02547596541164fd83b73a4aec2.png

Looks like I've gotta wait for the 429 to clear before attempting the cookie test. I've tried all cookies with 429 in place and still not working. It's probably safe to say the cookies take IP into consideration and maybe other factors. I can only guess the cookies need to generated on the same system that's using the library. Otherwise it might always fail.

I'm only guessing at this point. I think we need to use the LOGIN_INFO cookie as others are either session only or for ads.

@MeteorBurn
Copy link

MeteorBurn commented May 12, 2020

https://i.gyazo.com/8b37f07d9aeaed050b1cc23df0f843d4.png << Here's a screenshot of what cookies are available to me. This is my own account though. I plan to make a separate account to test with.

I think we need to use the following cookies based on their expiry time >> https://i.gyazo.com/c61ac02547596541164fd83b73a4aec2.png

Looks like I've gotta wait for the 429 to clear before attempting the cookie test. I've tried all cookies with 429 in place and still not working. It's probably safe to say the cookies take IP into consideration and maybe other factors. I can only guess the cookies need to generated on the same system that's using the library. Otherwise it might always fail.

I'm only guessing at this point. I think we need to use the LOGIN_INFO cookie as others are either session only or for ads.

You need:
YSC; PREF; VISITOR_INFO; SID; HSID; SSID; APISID; SAPISID; LOGIN_INFO

100% work

PREF is optional cookie, but it set language of YouTube interface

@satish2832
Copy link
Author

How to get the extract of cookies in run time from youtube

@ComputerMaster1st
Copy link

https://i.gyazo.com/8b37f07d9aeaed050b1cc23df0f843d4.png << Here's a screenshot of what cookies are available to me. This is my own account though. I plan to make a separate account to test with.
I think we need to use the following cookies based on their expiry time >> https://i.gyazo.com/c61ac02547596541164fd83b73a4aec2.png
Looks like I've gotta wait for the 429 to clear before attempting the cookie test. I've tried all cookies with 429 in place and still not working. It's probably safe to say the cookies take IP into consideration and maybe other factors. I can only guess the cookies need to generated on the same system that's using the library. Otherwise it might always fail.
I'm only guessing at this point. I think we need to use the LOGIN_INFO cookie as others are either session only or for ads.

You need:
YSC; PREF; VISITOR_INFO; SID; HSID; SSID; APISID; SAPISID; LOGIN_INFO

100% work

PREF is optional cookie, but it set language of YouTube interface

May I ask what you did to determine this please? What was your testing method and how often did you do these tests?

How to get the extract of cookies in run time from youtube

Use your browser's built-in developer tools. Googling about it can help.

@Tyrrrz
Copy link
Owner

Tyrrrz commented May 24, 2020

Seems like the question was answered.

@ComputerMaster1st
Copy link

Hi There,

Okay, now I received 429 with cookies. It's possible YouTube tracks user activity/history to make sure users aren't botting on logged accounts. I'm guessing we have to use accounts we actively use ourselves to perhaps avoid it as using cookies has worked for a while. I can only guess that a few cookies might need to be kept updated or something.

I'm unsure at this point.

TL;DR: There is no solution to get past the 429 other than paying for so many IPs and rotate through them somehow which involves breaking the httpclient or maybe recreate it all the time.

@duckieu1989
Copy link

Failed to perform an HTTP request to YouTube because of rate limiting.\r\nThis error indicates that YouTube thinks there were too many requests made from this IP and considers it suspicious.\r\nTo resolve this error, please wait some time and try again -or- try injecting an HttpClient that has cookies for an authenticated user.\r\nUnfortunately, there's nothing the library can do to work around this error.

@tinazhe
Copy link

tinazhe commented Nov 1, 2020

Failed to perform an HTTP request to YouTube because of rate limiting.\r\nThis error indicates that YouTube thinks there were too many requests made from this IP and considers it suspicious.\r\nTo resolve this error, please wait some time and try again -or- try injecting an HttpClient that has cookies for an authenticated user.\r\nUnfortunately, there's nothing the library can do to work around this error.

did you find a solution to this?

@duckieu1989
Copy link

duckieu1989 commented Nov 2, 2020 via email

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

No branches or pull requests

6 participants