This commit is contained in:
mshe 2026-06-08 17:35:36 +08:00
parent c6814b9765
commit 4774f6b403
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ def crawl_with_saved_state(auth_file):
with sync_playwright() as p:
# 加载之前保存的登录状态
logging.info(f"加载认证文件: {auth_file}")
browser = p.chromium.launch(headless=False,env={"DISPLAY": display}) # 可以无头模式了
browser = p.chromium.launch(headless=False) # 可以无头模式了
context = browser.new_context(storage_state=auth_file)
page = context.new_page()
page.goto('https://mail.qq.com')