From e192fa0cb1a5d44c546930380b2e1092fcc7c158 Mon Sep 17 00:00:00 2001 From: changyandao Date: Sat, 13 Jun 2026 15:33:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(tencent):=20=E8=A7=86=E9=A2=91=E5=8F=B7?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E6=97=B6=E9=97=B4=E9=80=89=E6=8B=A9=E5=99=A8?= =?UTF-8?q?=E6=94=B6=E5=B0=BE=E5=AE=B9=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit set_schedule_time 键入小时后改用 Enter 确认 + 收起浮层做容错(直接点 input-editor 可能被 weui-desktop-dialog 时间选择浮层遮挡),避免定时步偶发卡死 --- uploader/tencent_uploader/main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/uploader/tencent_uploader/main.py b/uploader/tencent_uploader/main.py index db887f7..32feaa2 100644 --- a/uploader/tencent_uploader/main.py +++ b/uploader/tencent_uploader/main.py @@ -492,7 +492,13 @@ class TencentBaseUploader(BaseVideoUploader): await page.click('input[placeholder="请选择时间"]') await page.keyboard.press("Control+KeyA") await page.keyboard.type(publish_date.strftime("%H")) - await page.locator("div.input-editor").click() + await page.keyboard.press("Enter") # 确认小时并关闭时间下拉 + await page.wait_for_timeout(500) + # 收起时间选择浮层:直接点描述区可能被 weui-desktop-dialog 遮挡,做容错 + try: + await page.locator("div.input-editor").click(timeout=5000) + except Exception: + await page.keyboard.press("Escape") async def open_upload_page(self, page: Page) -> None: await page.goto(TENCENT_UPLOAD_URL, timeout=120000, wait_until="domcontentloaded")