Closed Elite closed 1 week ago
I am now receiving "429 Too Many Requests" when using local socks5 proxy server to rotate my ip's. Seems related to this - https://github.com/LuanRT/YouTube.js/issues/725
@coletdjnz It seems the reason could be oauth2 plugin not using the proxy details provided to yt-dlp
, also, does oauth needs to performed for every request?
@coletdjnz It seems the reason could be oauth2 plugin not using the proxy details provided to
yt-dlp
, also, does oauth needs to performed for every request?
It uses the proxy details, since the requests go through yt-dlp's central http client.
It adds the token to every youtube request. It sounds like you are in general IP blocked from youtube due to requesting too much, which is unlikely to be related to this plugin.
I have very much the same issue and I don't think it is related to proxies, I don't use any:
the --print-traffic
output looks odd to me. The request to the web_creator client api appears to be malformed when used with the oauth2 plugin (I had to remove some sensitive data from the output but it shouldn't affect anything):
Without the oauth2 plugin, the request looks like this when it is working:
At any rate, disabling the oauth2 plugin by removing --username and --password from my config makes the requests work just fine, so it is not a networking issue:
I have been experiencing this for about a week or so and never thought to check the open issues. I hope the additional information provided can prove useful in tracking down the issue. If any further information is required I'd be happy to provide it.
Hmm, thanks for testing. I can reproduce too.
It appears that the web_creator client doesn't work with oauth :thinking:
Playing around in mitmproxy, if I remove the Authorization bearer header it works.
The full error response for interest is
{
"error": {
"code": 400,
"errors": [
{
"domain": "global",
"message": "Request contains an invalid argument.",
"reason": "badRequest"
}
],
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
}
I've been told ios_creator and android_creator similarly don't work with cookies, which might be related. Seems like youtube locks these clients down
@coletdjnz Great, eagerly waiting to get a new update with this fixed.
For the time being, you can try using another client if you are missing formats from web_creator. E.g. --extractor-args youtube:player-client=default,mweb
I am using this on my public facing server with proxy rotation, so you are saying using the above yt-dlp arguments prevent the "Sign in" message and also mitigate the 429 OAUTH2 plugin bug?
Awaiting https://github.com/yt-dlp/yt-dlp/pull/10710 so we can easily switch out clients
Awaiting yt-dlp/yt-dlp#10710 so we can easily switch out clients
I think they already merge it to the main branch!
Well it seems the file gets downloaded fine but these warnings are shown, what can be done to avoid these warnings?