话痨榜的图片渲染!

This commit is contained in:
Chenric
2024-07-08 13:42:58 +08:00
parent e08e1d2392
commit cff3a951b4
17 changed files with 482 additions and 263 deletions

View File

@ -4,7 +4,9 @@ with sync_playwright() as p:
for browser_type in [p.chromium, p.firefox, p.webkit]:
browser = browser_type.launch(headless=True)
page = browser.new_page()
page.goto('file:///H:/Bot/%E7%8E%B0%E5%BD%B9Bot/mybot/src/nonebot_plugin_dialectlist/nonebot_plugin_dialectlist/temple/rank_temple.html')
page.screenshot(path=f'screenshot-{browser_type.name}.png',full_page=True)
page.goto(
"file:///H:/Bot/%E7%8E%B0%E5%BD%B9Bot/mybot/src/nonebot_plugin_dialectlist/nonebot_plugin_dialectlist/temple/rank_temple.html"
)
page.screenshot(path=f"screenshot-{browser_type.name}.png", full_page=True)
print(page.title())
browser.close()
browser.close()