diff --git a/uploader/tencent_uploader/main.py b/uploader/tencent_uploader/main.py index 9fc04d9..1a08c24 100644 --- a/uploader/tencent_uploader/main.py +++ b/uploader/tencent_uploader/main.py @@ -416,7 +416,11 @@ async def tencent_cookie_gen( result = _build_login_result(False, "failed", "视频号登录失败", account_file) try: page = await context.new_page() - await page.goto(TENCENT_LOGIN_URL) + try: + await page.goto(TENCENT_LOGIN_URL, wait_until="domcontentloaded", timeout=60000) + except Exception as exc: + tencent_logger.warning(_msg("⚠️", f"首页加载超时({exc}),尝试继续等待登录页渲染")) + await page.wait_for_timeout(3000) try: qrcode_info = await _save_tencent_qrcode(page, account_file, qrcode_callback=qrcode_callback) qrcode_path = Path(qrcode_info["image_path"])