chore: auto release commit (2026-09-14 18:15:26)
All checks were successful
技能自动化发布 / release (push) Successful in 6s

This commit is contained in:
2026-09-14 18:15:26 +08:00
parent 6eb304bca2
commit 8ad3186057
4 changed files with 42 additions and 8 deletions

View File

@@ -306,12 +306,38 @@ def collect_all(
downloaded = 0
with sync_playwright() as p:
ctx = p.chromium.launch_persistent_context(
user_data_dir=str(profile_dir),
headless=headless,
accept_downloads=True,
viewport={"width": 1440, "height": 900},
)
# v1.1.9:headed 模式优先用系统 Edge(跟 Windows 桌面 session 同源,
# 能真正弹窗让你看到并手工登录);找不到则 fallback Playwright 内置 chromium
if not headless:
try:
ctx = p.chromium.launch_persistent_context(
user_data_dir=str(profile_dir),
headless=False,
accept_downloads=True,
channel="msedge",
viewport={"width": 1440, "height": 900},
)
logger.info(
"platform_collector: 使用系统 Edge(headed 弹窗)"
)
except Exception as e:
logger.warning(
"platform_collector: 系统 Edge 启动失败(%s),fallback Playwright chromium",
e,
)
ctx = p.chromium.launch_persistent_context(
user_data_dir=str(profile_dir),
headless=False,
accept_downloads=True,
viewport={"width": 1440, "height": 900},
)
else:
ctx = p.chromium.launch_persistent_context(
user_data_dir=str(profile_dir),
headless=True,
accept_downloads=True,
viewport={"width": 1440, "height": 900},
)
try:
page = ctx.new_page()
# v1.1.6:覆盖 Playwright 默认操作超时(之前无 set_default_timeout,导致