This commit is contained in:
xtaodada 2022-09-03 23:12:04 +08:00
parent d2b55088b9
commit bf0d6ccdf0
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -551,10 +551,10 @@ async def getPanelMsg(uid: str, char: str = "all", refresh: bool = False) -> Dic
try:
page = await browser.new_page()
await page.set_viewport_size({"width": 1000, "height": 1500})
await page.goto("file://" + str(tmpFile.resolve()), timeout=5000)
await page.goto("file://" + str(tmpFile.resolve()), timeout=50000)
card = await page.query_selector("body")
assert card is not None
picBytes = await card.screenshot(timeout=5000)
picBytes = await card.screenshot(timeout=50000)
bio = io.BytesIO(picBytes)
bio.name = "card.png"
print(f"图片大小 {len(picBytes)} 字节")