add new argument to make version dir, default is true

master
Max 2023-07-25 17:47:07 +08:00 committed by GitHub
parent b2793609b5
commit 5fa98d1fe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -413,7 +413,7 @@ def load_chromdriver_normal(config_dict, driver_type):
Root_Dir = get_app_root() Root_Dir = get_app_root()
webdriver_path = os.path.join(Root_Dir, "webdriver") webdriver_path = os.path.join(Root_Dir, "webdriver")
chromedriver_autoinstaller.install(path=webdriver_path) chromedriver_autoinstaller.install(path="webdriver", make_version_dir=False)
chromedriver_path = get_chromedriver_path(webdriver_path) chromedriver_path = get_chromedriver_path(webdriver_path)
@ -446,7 +446,7 @@ def load_chromdriver_normal(config_dict, driver_type):
pass pass
except FileNotFoundError: except FileNotFoundError:
pass pass
chromedriver_autoinstaller.install(path=webdriver_path) chromedriver_autoinstaller.install(path="webdriver", make_version_dir=False)
chrome_service = Service(chromedriver_path) chrome_service = Service(chromedriver_path)
try: try:
driver = webdriver.Chrome(service=chrome_service, options=chrome_options) driver = webdriver.Chrome(service=chrome_service, options=chrome_options)
@ -518,7 +518,7 @@ def load_chromdriver_uc(config_dict):
Root_Dir = get_app_root() Root_Dir = get_app_root()
webdriver_path = os.path.join(Root_Dir, "webdriver") webdriver_path = os.path.join(Root_Dir, "webdriver")
chromedriver_autoinstaller.install(path=webdriver_path) chromedriver_autoinstaller.install(path="webdriver", make_version_dir=False)
chromedriver_path = get_chromedriver_path(webdriver_path) chromedriver_path = get_chromedriver_path(webdriver_path)
@ -591,7 +591,7 @@ def load_chromdriver_uc(config_dict):
pass pass
except FileNotFoundError: except FileNotFoundError:
pass pass
chromedriver_path = get_chromedriver_path(webdriver_path) chromedriver_autoinstaller.install(path="webdriver", make_version_dir=False)
try: try:
driver = uc.Chrome(driver_executable_path=chromedriver_path, options=options, headless=config_dict["advanced"]["headless"]) driver = uc.Chrome(driver_executable_path=chromedriver_path, options=options, headless=config_dict["advanced"]["headless"])
except Exception as exc2: except Exception as exc2: