调整chrome内容
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user