Selenium, VPN and google search results

robifz

Newbie
Joined
Dec 15, 2023
Messages
9
Reaction score
2
I am "testing" my website with my selenium python script but I notice when I use a VPN (ExpressVPN) to change countries google still uses the original country. So it is not using IP to determine the script location but then how is it doing it?
And how can I force google to think I am in the VPN country.
TIA
 
Delete the cookies after changing the country and/or start with a fresh session,
Your problem is most common with Google language setting, is it the case or the location?
 
If you're doing this in your browser it is probably detecting your browser profile. This should be a clean profile between "instances" or in your case between sessions.

Btw, you should have just kept this all in one thread instead of two different posts. Good luck.
 
If you're doing this in your browser it is probably detecting your browser profile. This should be a clean profile between "instances" or in your case between sessions.

Btw, you should have just kept this all in one thread instead of two different posts. Good luck.
When I change country I restart all of the sessions. They run incognito selenium with different user agents.
The 2 questions were different and I have learned that if you ask 2 question only one is answered. :)
 
Back
Top