From c3e508a498ed15325251679c5de24f89f77273a6 Mon Sep 17 00:00:00 2001 From: liuwei Date: Fri, 16 Jan 2026 15:55:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=89=B2=E8=8A=B1=E5=A0=82?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/sehuatang/shehuatang_undetected.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/sehuatang/shehuatang_undetected.py b/utils/sehuatang/shehuatang_undetected.py index ddb8c95..e55d3cd 100644 --- a/utils/sehuatang/shehuatang_undetected.py +++ b/utils/sehuatang/shehuatang_undetected.py @@ -79,7 +79,8 @@ def fetch_and_create_pdf(url): options.add_argument('--disable-dev-shm-usage') # 创建driver实例 - driver = uc.Chrome(options=options, version_main=None) + # 让 undetected_chromedriver 自动检测浏览器版本并下载匹配的 ChromeDriver + driver = uc.Chrome(options=options) logger.info(f"正在访问: {url}") driver.get(url)