Python Requests, Need help. Getting Rate Limited With 70 Proxies???

spectrejoe

Elite Member
Jr. VIP
Joined
Sep 25, 2013
Messages
4,705
Reaction score
2,701
Can someone give me a hand? I'm using 70 proxies for an API that allows you to do 1 request per second.

while 1:
timer = datetime.now()
print(f'new check {timer}')
while 1:
time.sleep(0.5)
resp = requests.get(URL, headers=headers, proxies=proxies)
if resp.status_code == 200:
proxy = next(proxy_cycle)
proxies = {
"http://": proxy,
"https://":proxy
}
break
else:
print(resp.status_code)
proxy = next(proxy_cycle)
proxies = {
"http://": proxy,
"https://":proxy
}
print(proxy)
###### continues the loop with the rest of the code

If I go to the URL manually I can spam F5 F5 F5 F5 like 10x in a row and I don't get limited but my proxies are getting error 429 too many requests like wtf? I'm using:

proxy = next(proxy_cycle)
proxies = {
"http://": proxy,
"https://":proxy
}

Even on successful attempts to go to the next proxy.
I track the run time with

timer = datetime.now()
print(f'new check {timer}')

And it's roughly 0.7s with time.sleep(0.5) on each loop. So for each proxy It should be doing AT MOST 1 request every (0.7*70=49 seconds)???? Yet they're still often getting rate limited....
 
I recommend you randomly choosing proxy from the list. If it will not work, you should change proxy provider or maybe google is banning your pool of proxy. Remember that proxy provider is not rotating proxy every minute, usually it is done in 24h.
 
I recommend you randomly choosing proxy from the list. If it will not work, you should change proxy provider or maybe google is banning your pool of proxy. Remember that proxy provider is not rotating proxy every minute, usually it is done in 24h.
it's for an API not google though. The API devs said you can requests 2x per second and it's not working properly.

It might be related to Cloudflare X-Rate-Limiting or something but dunno how to bypass that
 
Can someone give me a hand? I'm using 70 proxies for an API that allows you to do 1 request per second.



If I go to the URL manually I can spam F5 F5 F5 F5 like 10x in a row and I don't get limited but my proxies are getting error 429 too many requests like wtf? I'm using:



Even on successful attempts to go to the next proxy.
I track the run time with



And it's roughly 0.7s with time.sleep(0.5) on each loop. So for each proxy It should be doing AT MOST 1 request every (0.7*70=49 seconds)???? Yet they're still often getting rate limited....
It's possible that you aregetting blocked at a proxy level, or even the datacenter where your proxies are from.

Change to residential rotating proxies that change with every request, so you get different datacenters, info,, etc. They are pricey but it's a good way to bypass those filters
 
It's possible that you aregetting blocked at a proxy level, or even the datacenter where your proxies are from.

Change to residential rotating proxies that change with every request, so you get different datacenters, info,, etc. They are pricey but it's a good way to bypass those filters
Is that possible? That they change with every request? Considering I'm making a request every 0.1 seconds
 
Is that possible? That they change with every request? Considering I'm making a request every 0.1 seconds
not any rotating proxy does this, but backconnect proxies change with each request. Datacenter proxies are highly spammed and residential proxies+ are expensive, that is the main tradeoff
 
not any rotating proxy does this, but backconnect proxies change with each request. Datacenter proxies are highly spammed and residential proxies+ are expensive, that is the main tradeoff
oof yea extremely expensive from what I'm seeing.

Do you know any good provider for "normal" proxies? Because I feel like my original IP is most likely leaking or getting detected by cloudflare somehow.
 
oof yea extremely expensive from what I'm seeing.

Do you know any good provider for "normal" proxies? Because I feel like my original IP is most likely leaking or getting detected by cloudflare somehow.
storm proxies worked for me, they have backconnect datacenter proxies. Generally what you have to do is give them a generous timeout like 20s and retry on failure. Sometimes they have to retry several times. This is for scraping google though so if you're using a less restrictive platform they should work easily
 
Found out the issue, the proxies weren't being used through the requests.get it's working fine now, although a tiny bit slow due to proxies taking a bit to connect, I guess the key here is getting super fast proxies. if there's any recommendation for decent fast proxies lmk
 
Found out the issue, the proxies weren't being used through the requests.get it's working fine now, although a tiny bit slow due to proxies taking a bit to connect, I guess the key here is getting super fast proxies. if there's any recommendation for decent fast proxies lmk
Requests has a timeout parameter, which is good specifically for this
 
Found out the issue, the proxies weren't being used through the requests.get it's working fine now, although a tiny bit slow due to proxies taking a bit to connect, I guess the key here is getting super fast proxies. if there's any recommendation for decent fast proxies lmk
hehe yeah that happens. When we thing something is causing an error and we don't even see if that thing is even plugged in :D
 
Back
Top