3日に1回ぐらいエラーで失敗しているので
Traceback (most recent call last): File "today-hospital.py", line 17, in <module> driver = webdriver.Chrome(chrome_options=options) desired_capabilities=desired_capabilities) File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 75, in __init__ File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__ self.start_session(desired_capabilities, browser_profile) File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 310, in execute File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/remote_connection.py", line 466, in execute response = self.execute(Command.NEW_SESSION, parameters) response = self.command_executor.execute(driver_command, params) return self._request(command_info[0], url, body=data) File "/app/.heroku/python/lib/python3.6/site-packages/selenium/webdriver/remote/remote_connection.py", line 490, in _request resp = self._conn.getresponse() response.begin() version, status, reason = self._read_status() File "/app/.heroku/python/lib/python3.6/http/client.py", line 258, in _read_status File "/app/.heroku/python/lib/python3.6/socket.py", line 586, in readinto File "/app/.heroku/python/lib/python3.6/http/client.py", line 1331, in getresponse line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") return self._sock.recv_into(b) File "/app/.heroku/python/lib/python3.6/http/client.py", line 297, in begin ConnectionResetError: [Errno 104] Connection reset by peer
# 1/30 ウエイトを入れてみたけど再発 driver.implicitly_wait(10) # 2/2 以下を追加 options.add_argument('--no-sandbox') driver.set_page_load_timeout(60) #2/5 Phantomjsに変更
エラーがなくなればいいんだけどだめならPhantomjsに変更しようかな 2/9 Phantomjsに変更してからエラーなし