proxy_config.new_url() does not return new proxy
Here is my selenium python script, where i try to rotate proxies using the proxy_config.new_url():
Due to discord message size limitation i attach the log output of the above code in a new message below...
5 Replies
Someone will reply to you shortly. In the meantime, this might help:
-# This post was marked as solved by Matous. View answer.
stormy-goldOP•2mo ago
The logs of the above code show the following:
As you can see the script queries the browser IP from https://api.ipify.org?format=json and logs it in output. Even though the
proxy_config.new_url()
is used to get a new proxy for each selenium instance, the same IP is always returned. The same is happening if i use RESIDENTIAL
proxy group. Am i missing something?magic-amber•2w ago
Hi @huey louie dewey,
to get various proxy URLs you will have to specify
sessionID
parameter.
You can just use something like
stormy-goldOP•2w ago
Hi @Matous . Thanks for your suggestion. Trying your proposed method without success. Here is the log messages after implementing your correction above:
In the above log i was using
RESIDENTIAL
type. Though the same result occur if i use DATACENTER
type. I am a free user if that matters (but i don't think it matters here - In the free plan I should have access to 5 DATACENTER
proxies and the RESIDENTIAL
proxies have their cost on my monthly balance). Could this be an API issue? I could open an issue in github if needed.magic-amber•2w ago
Hey, thanks a lot for pointing this out. I’ve reached out to the team, and I’ll keep you in the loop once I hear back.
Hi @huey louie dewey,
so I got a response:
There is no need to do the new_url in a loop, it always gives you the same URL (you just can pass session for formatting but no session == random session). I think Selenium couldn't support authenticated proxies so maybe they are not using proxies at all. Can they try Playwright? That should work if they spawn a new browser in a loopAnd I also tested the
new_url
this way: