1

I want to write a script that can open website with different ip, I use the script below, but it doesn't load the page

from http_request_randomizer.requests.proxy.requestProxy import RequestProxy
from selenium import webdriver


req_proxy = RequestProxy() 
proxies = req_proxy.get_proxy_list()

PROXY = proxies[0].get_address()

webdriver.DesiredCapabilities.CHROME['proxy']={
    "httpProxy":PROXY,
    "ftpProxy":PROXY,
    "sslProxy":PROXY,

    "proxyType":"MANUAL",

}
driver = webdriver.Chrome(executable_path= r"/Users/apple/Downloads/chromedriver")
driver.get('https://www.expressvpn.com/what-is-my-ip')

is this related to proxies or something is wrong with my script? should I use different method to do my task? I would Appreciate if someone can help me

Cnous
  • 41
  • 5
  • 1
    Does this answer your question? [how do i set proxy for chrome in python webdriver](https://stackoverflow.com/questions/11450158/how-do-i-set-proxy-for-chrome-in-python-webdriver) – Wereii Jul 30 '20 at 11:16
  • one problem can be that Selenium/Chrome many times changes code and some solutiona don't work any more. Other problem is that `RequestProxy` uses free proxy servers which often are outdated - they don't work any more or servers know them and blocks them. And this is usually problem when it doesn't load page. – furas Jul 30 '20 at 12:00

0 Answers0