I want to fix the path to /tmp/.com.google.Chrome.XXXXX/internal.zip created when scraping with ChromeDriver.

Asked 3 months ago, Updated 3 months ago, 14 views

I'm scraping with Selenium + ChromeDriver on Linux (RedHat).

(xxxxxx is a random string that varies with each boot.)

A file similar to the one shown in is created.
I'd like to change the path that this file is created to a specific directory.

Background you want to change
The above files are subject to on-access scanning by virus scanning software (SAV since Sophos Antivirus), and rarely try to scan, but they have already been deleted, resulting in an error.
The SAV specification allows you to exclude paths that contain regular expressions, but once you pass through the tarpa driver, you are judged to be excluded, so if you delete them during the tarpa driver process, you will get an error.
Therefore, we would like to change the output destination of the following files under the excluded directory of the fixed path.

Cache and user data are also printed in directories containing random characters, but can be fixed with the following options:

 --user-data-dir=fixed path
--disk-cache-dir =fixed path

web-scraping chromedriver

2022-09-30 14:22

1 Answers

I solved myself.
By specifying the environment variable TMPDIR, we have confirmed that it is created under it.
This allowed the exclusion in the fixed path.
Thank you.

2022-09-30 14:22

If you have any answers or tips

© 2023 OneMinuteCode. All rights reserved.