From dc52e7582fa6647e4e49ec68aac890746d9245f0 Mon Sep 17 00:00:00 2001 From: Sen ZmaKi Date: Sat, 29 Jun 2024 14:50:51 +0300 Subject: [PATCH] Debug --- senpwai/common/selenium.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/senpwai/common/selenium.py b/senpwai/common/selenium.py index 63fc22d..055a675 100644 --- a/senpwai/common/selenium.py +++ b/senpwai/common/selenium.py @@ -75,11 +75,8 @@ def setup_options(options: ArgOptions): if isinstance(options, ChromiumOptions): # HACK: https://github.com/SeleniumHQ/selenium/issues/13095#issuecomment-1793310460 # options.add_experimental_option("excludeSwitches", ["enable-logging"]) - chrome_path = os.getenv("CHROME_PATH", None) - print("Chrome path:", chrome_path) - options.binary_location = chrome_path if headless: - pass + options.add_argument("--headless=new") return options def helper(browser_name: BrowserName): @@ -93,7 +90,6 @@ def helper(browser_name: BrowserName): chrome_driver_path = os.getenv("CHROME_DRIVER_PATH", None) print("Chrome driver path:", chrome_driver_path) service_chrome = ChromeService( - executable_path=chrome_driver_path ) options = cast(ChromeOptions, setup_options(ChromeOptions())) self.driver = Chrome(service=service_chrome, options=options)