fix(tencent): 视频号定时时间选择器收尾容错

set_schedule_time 键入小时后改用 Enter 确认 + 收起浮层做容错(直接点
input-editor 可能被 weui-desktop-dialog 时间选择浮层遮挡),避免定时步偶发卡死
This commit is contained in:
changyandao
2026-06-13 15:33:01 +08:00
parent 5e28092f20
commit e192fa0cb1
+7 -1
View File
@@ -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")