Holly Johnson
Holly Johnson

Reputation: 509

python selenium Chrome Web Driver. How to Proxy IP/ Where to buy

So i want to make Selenium Project where I need to change my ip to to a specific Cities.For example one in Dallas, One in NewYork, One in Los Angles.

I wanted to know how do I apply a proxy to the chrome web driver using PYTHON. If you guys can show me an example code that would be very helpful. I have seen others with Firefox web driver but not the chrome web Driver.

Also where can i buy a Dedicated IP PROXY for each city. I want to be the only one using that ip Address.

Upvotes: 0

Views: 7127

Answers (1)

ralph.mayr
ralph.mayr

Reputation: 1340

from selenium import webdriver

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=1.2.3.4:8080')
driver = webdriver.Chrome(chrome_options=chrome_options)

driver.get("...")

Upvotes: 4

Related Questions