執(zhí)行selenium抓取的時候,報下面錯誤:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 99
這是因為瀏覽器的版本和Chromedriver的版本不匹配,Chrome瀏覽器如果沒有關(guān)閉自動更新,會一直出現(xiàn)這個問題,比較麻煩,建議關(guān)閉Chrome瀏覽器自動更新,參照另外一篇文章:Chrome瀏覽器關(guān)閉自動更新
谷歌鏡像版本下載鏈接:https://registry.npmmirror.com/binary.html?path=chromedriver/文章來源:http://www.zghlxwxcb.cn/news/detail-600814.html
在這個里面找比瀏覽器版本低的
下載問之后,把解壓的chromedriver.exe文件放在python的安裝目錄下,如果是用anaconda的話,把chromedriver.exe文件放在anaconda目錄下的Scripts文件下。文章來源地址http://www.zghlxwxcb.cn/news/detail-600814.html
到了這里,關(guān)于chrome瀏覽器版本和Chromedriver不匹配問題解決辦法selenium.common.exceptions.SessionNotCreatedException的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!