Python webdriver.Chrome错误号10054

Python webdriver.Chrome错误号10054,python,google-chrome,selenium,Python,Google Chrome,Selenium,我有一些网页抓取脚本,但现在它不工作。我只在以下几行中得到一个错误: from selenium import webdriver driver = webdriver.Chrome() 我得到: socket.error: [Errno 10054] An existing connection was forcibly closed by the remote host 我尝试重新安装Chrome,使用chromedriver的最新版本,但仍然无法工作。 谁能帮帮我吗 谢谢试试看 chr

我有一些网页抓取脚本,但现在它不工作。我只在以下几行中得到一个错误:

from selenium import webdriver
driver = webdriver.Chrome()
我得到:

socket.error: [Errno 10054] An existing connection was forcibly closed by the remote host
我尝试重新安装Chrome,使用chromedriver的最新版本,但仍然无法工作。 谁能帮帮我吗

谢谢

试试看

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--screen-size=1920X1080')
driver = webdriver.Chrome('your_chrome_patch/chromedriver',chrome_options=chrome_options)
driver.get(url)

为您的解决方案添加解释