前提
python seleniumを使用してスクレイピングを実装しようとしています。下記のコードを実装したところselenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary エラーが発生し、困っています。
実現したいこと
パスを使用せずにスクレイピングを実現させたい
発生している問題・エラーメッセージ
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
該当のソースコード
python
from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.options import Options # option addargumentでブラウザ非表示でselenium実行options = Options()options.add_argument('--headless') # chromeoption=optionsでブラウザ非表示を適用driver = webdriver.Chrome(ChromeDriverManager().install(), chrome_options=options)# driver = webdriver.Chrome(ChromeDriverManager().install())driver.implicitly_wait(10)
補足情報(FW/ツールのバージョンなど)
ターミナル上でpip install selenium, pip install webdriver_manager を実行しています。

0 コメント