-1

by using the code below the UserData-dir gets bigger and bigger with every launch, is there any fix for this? i understand that undetected chromedriver downloads from every launch new but shouldnt it replace the data instead of just putting it in again? one directory got to like 2GB and took 4 min to load...

option = uc.ChromeOptions()
option.add_argument(r"--driver_executable_path=C:\Windows\chromedriver.exe")
option.add_argument(r'--user-data-dir=*/UserData')
driver = uc.Chrome(options=option)

1 Answers1

0

I cannot check it 'cause I'm on Linux anyway I think, maybe, it could not touch your UserData folder if instead of using your chromedrive.exe you do something like this using ChromeDriverManager:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)

But this is just an intuition without any proof, you gotta try.

Carapace
  • 377
  • 2
  • 9