LoginSignup
6
6

More than 5 years have passed since last update.

Pythonでスクレイピングをする際にwebdriverのchrome.exeのプロセスが残る

Posted at

表題の通り。chrome起動にselenium webdriverを使用してたら、タスクマネージャーでリソースモニターを開きプロセスを監視していると大量のchrome.exeが残っている。

chromeの設定→詳細設定→システムの
「Google Chromeを閉じた際にバックグラウンドアプリの処理を続行する」にチェックが入っている場合は、検索などのために都度開いているchromeのバックグラウンド処理の可能性があるのでそれをはずせばよいが、今回は定期実行のスクレイピングプログラムでのwebdriver使用が原因で実行終了後もプロセスが残る。なので、スクレイピング処理の最後に下記の2つを追加で解決。

WebDriver.close()
WebDriver.quit()
6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6