Setting the region in the Python Selenium Webdriver?

1k views Asked by At

I'm currently making a program which fetches the prices and discounts etc. off the Steam sales search page, however all the prices are in $ and I need them to be in £. I'm relatively new to Python and Selenium, and have been unable to fix the issue myself, and I haven't seen anyone else with a similar problem.

I'm using the Selenium webdriver, and don't know how to configure its region, but I'm assuming that it'll probably need to be something inputted into Chrome Options, but I don't know.

Thanks in advance.

2

There are 2 answers

1
SbekS On BEST ANSWER

Add &cc=US or &currency=1 to url. I can't tell which will work if you dont give specific url.
Can you give an example url?

1
Sushil On

You can use proxy servers for this as mentioned in the answer to this question:

from selenium import webdriver

PROXY = "23.23.23.23:3128" # IP:PORT or HOST:PORT

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=%s' % PROXY)

chrome = webdriver.Chrome(options=chrome_options)
chrome.get("http://whatismyipaddress.com")