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:
@@ -4,11 +4,13 @@ from playwright.async_api import TimeoutError, ViewportSize
|
||||
from ..config.config import Config
|
||||
from .browser import BrowserManager
|
||||
from .retry import retry
|
||||
from .time_it import time_it
|
||||
|
||||
config = get_plugin_config(Config)
|
||||
|
||||
|
||||
@retry(exception_type=TimeoutError, reply='截图失败, 重试中')
|
||||
@time_it
|
||||
async def screenshot(url: str) -> bytes:
|
||||
browser = await BrowserManager.get_browser()
|
||||
async with (
|
||||
|
||||
Reference in New Issue
Block a user