0

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.

Holly Johnson
  • 509
  • 1
  • 13
  • 25

1 Answers1

4
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("...")
ralph.mayr
  • 1,320
  • 8
  • 12