chromedriverの発生しているエラー

前提

現在pythonのseleniumを利用して趣味でメルカリのログインを突破しようと開発してます。

実現したいこと

メルカリのログインをユーザープロフィールのログインデータを利用して2段階認証を通り抜けたいと考えております。

発生している問題・エラーメッセージ

webdriverを利用してchromeへアクセスしているのですが、メルカリのサイトへアクセスできない状況です。
masashi@MacBook-Air Mercai-automation-tools % /Users/masashi/.pyenv/vers
ions/3.6.5/bin/python /Users/masashi/Desktop/Mercai-automation-tools/nne
w.py
Traceback (most recent call last):
File "/Users/masashi/Desktop/Mercai-automation-tools/nnew.py", line 14, in <module>
driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options)
File "/Users/masashi/.pyenv/versions/3.6.5/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init
self.service.start()
File "/Users/masashi/.pyenv/versions/3.6.5/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 98, in start
self.assert_process_still_running()
File "/Users/masashi/.pyenv/versions/3.6.5/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running
% (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service /Applications/Google Chrome.app/Contents/MacOS/Google Chrome unexpectedly exited. Status code was: 0

該当のソースコード

python

ソースコード from selenium import webdriver from selenium.webdriver.chrome.options import Options #userdata_diruserdata_dir=r'/Users/masashi/Library/Application Support/Google/Chrome/Default'# Seleniumをあらゆる環境で起動させるChromeオプションoptions = Options()options.add_argument('--user-data-dir='+userdata_dir) options.add_experimental_option("excludeSwitches", ["enable-logging"]) #ChromeDriverの位置DRIVER_PATH = r'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'# ブラウザの起動driver = webdriver.Chrome(executable_path=DRIVER_PATH, chrome_options=options) driver.get('https://jp.mercari.com/sell/edit/m84283305983') ### 試したこと driver.getの部分には、メルカリのアカウントの編集ページのURLを使用してますが、driver.getまでソースが届いていません。 ### 補足情報(FW/ツールのバージョンなど) ここにより詳細な情報を記載してください。

コメントを投稿

0 コメント