Python Selenium Proxy in Chrome
There's nothing wrong with your code. That proxy is just not available/not working anymore.
Try to find another proxy that a better uptime. Keep it mind that public proxies have a noticeable latency so the page will load pretty slow.
Failing to set up proxy for chrome in Selenium (Python 3.7)
Below is the correct way to add proxy in chrome ,
JAVA:
ChromeOptions chromeOptions = new ChromeOptions();
String proxyadd = "176.9.119.170:8080";
Proxy proxy = new Proxy();
proxy.setHttpProxy(proxyadd);
proxy.setSslProxy(proxyadd);
chromeOptions.setCapability("proxy", proxy);
WebDriver driver = new ChromeDriver(chromeOptions);
PYTHON:
from selenium import webdriver
PROXY="176.9.119.170:8080"
webdriver.DesiredCapabilities.CHROME['proxy'] = {
"httpProxy": PROXY,
"ftpProxy": PROXY,
"sslProxy": PROXY,
"proxyType": "MANUAL",
}
webdriver.DesiredCapabilities.CHROME['acceptSslCerts']=True
driver =webdriver.Chrome(r".\chromedriver.exe")
driver.get("https://www.google.com")
It seems that chrome is not able to connect to proxy may be it is using system proxy. Try above mentioned approach to set proxy
How to use chomedriver with a proxy for selenium webdriver?
Its possible for Chrome to be started with command lines with selenium web driver. The command line for the proxy is:
--proxy-server=:
Related Topics
How to Get a Fields Particular Value of Json in Python
How to Test If a Column Exists and Is Not Null in a Dataframe
How to Convert Float into Hours Minutes Seconds
How to Pad a String With Leading Zeros in Python 3
How to Change Dd-Mm-Yyyy Date Format to Yyyy-Dd-Mm in Pandas
Python Serial: How to Use the Read or Readline Function to Read More Than 1 Character At a Time
How to Replace Nan Values Where the Other Columns Meet a Certain Criteria
How to Change the Foreground or Background Colour of a Tkinter Button on MAC Os X
Cv2 Image Error: Error: (-215:Assertion Failed) !Ssize.Empty() in Function 'Cv::Resize'
Python Anaconda - How to Safely Uninstall
How to Change a Two Dimensional Array to One Dimensional
Pandas Series With Different Lengths
How to Find Consecutive Numbers in a Python List
How to Change a Dataframe Column from String Type to Double Type in Pyspark
How to Append Two Bytes in Python
How to Extract Data from Text Field in Pandas Dataframe
Cv2.Videocapture.Open() Always Returns False
Visual Studio Code Windows , Python Pandas . No Module Named Pandas