From dc06353e8d1636300564c1efca327b2fd3ad5ca0 Mon Sep 17 00:00:00 2001 From: Pyhtagodzilla <1670671958@qq.com> Date: Tue, 22 Jul 2025 23:10:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E4=BF=AE=E5=B0=8F=E8=A1=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run.py | 4 ++-- utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/run.py b/run.py index a31894c..49ba459 100644 --- a/run.py +++ b/run.py @@ -7,8 +7,8 @@ def main(): driver = init_driver_chrome() get_points(driver=driver) - driver.quit() - time.sleep(30) + driver.close() + time.sleep(10) get_points(driver=driver) if __name__ == "__main__": diff --git a/utils.py b/utils.py index f643238..27deb9e 100644 --- a/utils.py +++ b/utils.py @@ -31,7 +31,7 @@ def init_driver_chrome(): options = Options() options.add_argument("--headless") # Run in headless mode options.add_argument("--no-sandbox") - options.add_argument('--user-data-dir=/home/pythagodzilla/.config/chromium/Default') + options.add_argument('--user-data-dir=/home/pythagodzilla/.config/chromium') # options.add_experimental_option("detach", True) driver = webdriver.Chrome(service=service, options=options) driver.implicitly_wait(5) # Implicit wait for elements to load