update
This commit is contained in:
parent
d2b55088b9
commit
bf0d6ccdf0
@ -551,10 +551,10 @@ async def getPanelMsg(uid: str, char: str = "all", refresh: bool = False) -> Dic
|
|||||||
try:
|
try:
|
||||||
page = await browser.new_page()
|
page = await browser.new_page()
|
||||||
await page.set_viewport_size({"width": 1000, "height": 1500})
|
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")
|
card = await page.query_selector("body")
|
||||||
assert card is not None
|
assert card is not None
|
||||||
picBytes = await card.screenshot(timeout=5000)
|
picBytes = await card.screenshot(timeout=50000)
|
||||||
bio = io.BytesIO(picBytes)
|
bio = io.BytesIO(picBytes)
|
||||||
bio.name = "card.png"
|
bio.name = "card.png"
|
||||||
print(f"图片大小 {len(picBytes)} 字节")
|
print(f"图片大小 {len(picBytes)} 字节")
|
||||||
|
Loading…
Reference in New Issue
Block a user