Just remove
- "user_data_dir = os.path.expanduser("~\AppData\Local\Google\Chrome\User Data").replace("\","/")
- chrome_options.add_argument(f"--user-data-dir={user_data_dir}")"
- service = Service(executable_path="chromedriver.exe")
Those are not needed for the latest Selenium and keep everything to the basic defaults