使用新版模板 (#313)

* 🔥 删除现有模板

*  自动克隆模板仓库

* 🔥 删除 identicon 相关代码

* 🚚 修改静态文件路径

*  使用新模板进行渲染

*  每次渲染都获取一次模板, 以应对实时更新

*  TETR.IO 绑定图使用新模板

* 🚚 修改网络路径

*  TOP 绑定图使用新模板

*  TOS 绑定图使用新模板

* 🐛 防止截图超时

* 🐛 Pydantic V1 会把 float 转换成 int

* ✏️ 模板字段名写错了

*  兼容 Pydantic V1

*  TETR.IO 查询图使用新模板

* 🐛 在查询的用户没有历史记录时不去查询更多记录
This commit is contained in:
呵呵です
2024-05-10 09:41:05 +08:00
committed by GitHub
parent e47f1bb6f9
commit 716e392a3a
54 changed files with 280 additions and 1826 deletions

View File

@@ -7,4 +7,5 @@ async def screenshot(url: str) -> bytes:
await browser.new_page(no_viewport=True, viewport={'width': 0, 'height': 0}) as page,
):
await page.goto(url)
await page.wait_for_load_state('networkidle')
return await page.screenshot(full_page=True, type='png')