调整chrome内容

This commit is contained in:
liuwei
2025-05-06 17:04:06 +08:00
parent 58d54dd30c
commit bb7560d390

View File

@@ -69,11 +69,6 @@ def fetch_and_create_pdf(url):
chrome_driver_path = ChromeDriverManager().install()
driver = webdriver.Chrome(service=Service(chrome_driver_path), options=options)
# 使用本地固定的ChromeDriver路径避免每次自动更新
chrome_driver_path = os.path.join(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
"utils", "chromedriver", "chromedriver.exe"
)
# 如果本地没有chromedriver.exe则使用webdriver_manager下载一次
if not os.path.exists(chrome_driver_path):
chrome_driver_path = ChromeDriverManager().install()