mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
✨ 截图前等待 networkidle
还是得等)
This commit is contained in:
@@ -27,4 +27,5 @@ async def screenshot(url: str) -> bytes:
|
|||||||
};
|
};
|
||||||
""")
|
""")
|
||||||
await page.set_viewport_size(size)
|
await page.set_viewport_size(size)
|
||||||
return await page.locator('id=content').screenshot(timeout=5000, type='png')
|
await page.wait_for_load_state('networkidle')
|
||||||
|
return await page.locator('id=content').screenshot(animations='disabled', timeout=5000, type='png')
|
||||||
|
|||||||
Reference in New Issue
Block a user