Python爬虫類Selenium駆動Chromeエラーselenium.exceptions.WebDriver Exception:Message
3576 ワード
プログラムコード:
このエラーのほとんどはブラウザとドライバのバージョンが一致しないためです.ブラウザバージョンを見ると、最新の69バージョン があります.
from selenium import webdriver
url = "http://www.baidu.com"
driver = webdriver.Chrome()
driver.get(url=url)
実行後のエラー:selenium.common.exceptions.WebDriverException: Message: unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"7A06D5022B2C8796268ABF79AE246C45","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=69.0.3497.81)
(Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86_64)
ブラウザのスクリーンショット:このエラーのほとんどはブラウザとドライバのバージョンが一致しないためです.
chrome://settings/help
2.googleドライバの対応するバージョン関係を確認するhttps://sites.google.com/a/chromium.org/chromedriver/downloads
3.2.41バージョンの駆動をダウンロードし、解凍して、chromeブラウザのインストールディレクトリの下に置いてください.C:\Program Files (x86)\Google\Chrome\Application
プログラムコードの再実行: