From e8f16c6721c98a4d0c0a89c6f2aeb83387b449e5 Mon Sep 17 00:00:00 2001 From: MangoFanFanw Date: Tue, 21 Apr 2026 22:23:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=20x3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在次测试,一定要把图片截出来! --- router/enhance/screenshot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/router/enhance/screenshot.py b/router/enhance/screenshot.py index 55d9bad..1e2ecb5 100644 --- a/router/enhance/screenshot.py +++ b/router/enhance/screenshot.py @@ -25,7 +25,9 @@ class ScreenShot(PlayContextManager): async def shot(self, save_path: str) -> None: await self.page.mouse.move(0, 0) try: - await self.page.wait_for_load_state("networkidle", timeout=1000) + await self.page.wait_for_load_state(timeout=10000) + except Exception: + pass finally: await self.page.screenshot(path=save_path) logger.debug(f"截图 | 截图已经保存在 {save_path=}")