mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
⚡️ 尝试提高截图性能
This commit is contained in:
@@ -17,7 +17,6 @@ async def screenshot(url: str) -> bytes:
|
|||||||
await browser.new_page(device_scale_factor=config.tetris.screenshot_quality) as page,
|
await browser.new_page(device_scale_factor=config.tetris.screenshot_quality) as page,
|
||||||
):
|
):
|
||||||
await page.goto(url)
|
await page.goto(url)
|
||||||
await page.wait_for_load_state('networkidle')
|
|
||||||
size: ViewportSize = await page.evaluate("""
|
size: ViewportSize = await page.evaluate("""
|
||||||
() => {
|
() => {
|
||||||
const element = document.querySelector('#content');
|
const element = document.querySelector('#content');
|
||||||
|
|||||||
Reference in New Issue
Block a user