お世話になります。
【ご質問内容】
①webdriverをexe化したフォルダのどこに配置すればブラウザが動くようになりますでしょうか?
②前提からして違う場合はご指摘頂けますと幸いです。
【背景】
ウェブスクレイピングするソフトを下記サイトを参考にexe化しました。
http://kconcon3.hatenablog.com/entry/2018/01/22/230000
こちらを他PCにて実行したところ、ブラウザが立ち上がらず終了してしまいました。
(下記にその時のエラーメッセージを記載してます。)
【試したこと】
エラーメッセージに
'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
と記載されていたため、
https://sites.google.com/a/chromium.org/chromedriver/getting-started
を確認しました。
こちらでは、「chromewebdriverを環境変数に設定してください」といった趣旨の事が書いてあったのですが、ユーザに毎回chromewebdriverをインストールさせて環境変数をセットする運用は避けたいです・・
EXEファイルが入ったフォルダのどこかにwebdriverをセットすることで解消できないかと考えているのですが、どこに置くべきか分からず手詰まりとなってしまいました。
以上、ご協力お願いいたします!
==
Traceback (most recent call last):
File "site-packages\selenium\webdriver\common\service.py", line 76, in start
File "subprocess.py", line 709, in init
File "subprocess.py", line 997, in _execute_child
FileNotFoundError: [WinError 2] 指定されたファイルが見つかりません。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "auto_working_reportTocostomer.py", line 9, in <module>
File "site-packages\selenium\webdriver\chrome\webdriver.py", line 68, in init
File "site-packages\selenium\webdriver\common\service.py", line 83, in start
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
[6436] Failed to execute script auto_working_reportTocostomer
==
あなたの回答
tips
プレビュー