From 583a7a3465faee7c8715393aea479ab9f52c0170 Mon Sep 17 00:00:00 2001 From: Qiufeng Date: Fri, 21 Aug 2026 16:59:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(tencent):=20page.goto=20=E5=8A=A0=20domcont?= =?UTF-8?q?entloaded=20+=2060s=20=E8=B6=85=E6=97=B6=20+=20=E5=AE=B9?= =?UTF-8?q?=E9=94=99=EF=BC=8C=E9=81=BF=E5=85=8D=E9=A6=96=E9=A1=B5=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E8=B6=85=E6=97=B6=E5=AF=BC=E8=87=B4=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uploader/tencent_uploader/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"])