mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
🚸 Add the screenshot_timeout parameter to the template_to_pic method to increase the timeout to avoid loading failure.
This commit is contained in:
parent
2ab1994e5a
commit
79b26f7188
@ -50,6 +50,7 @@ async def build_html_help():
|
|||||||
"base_url": f"file://{TEMPLATE_PATH}",
|
"base_url": f"file://{TEMPLATE_PATH}",
|
||||||
},
|
},
|
||||||
wait=2,
|
wait=2,
|
||||||
|
screenshot_timeout=60_000,
|
||||||
)
|
)
|
||||||
result = await BuildImage.open(pic).resize(0.5)
|
result = await BuildImage.open(pic).resize(0.5)
|
||||||
await result.save(ADMIN_HELP_IMAGE)
|
await result.save(ADMIN_HELP_IMAGE)
|
||||||
|
|||||||
@ -133,4 +133,5 @@ async def build_html_image(group_id: str | None) -> bytes:
|
|||||||
"base_url": f"file://{TEMPLATE_PATH}",
|
"base_url": f"file://{TEMPLATE_PATH}",
|
||||||
},
|
},
|
||||||
wait=2,
|
wait=2,
|
||||||
|
screenshot_timeout=60_000,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -151,4 +151,5 @@ async def build_zhenxun_image(session: Uninfo, group_id: str | None) -> bytes:
|
|||||||
"base_url": f"file://{TEMPLATE_PATH}",
|
"base_url": f"file://{TEMPLATE_PATH}",
|
||||||
},
|
},
|
||||||
wait=2,
|
wait=2,
|
||||||
|
screenshot_timeout=60_000,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -54,6 +54,7 @@ async def build_html_help():
|
|||||||
"base_url": f"file://{TEMPLATE_PATH}",
|
"base_url": f"file://{TEMPLATE_PATH}",
|
||||||
},
|
},
|
||||||
wait=2,
|
wait=2,
|
||||||
|
screenshot_timeout=60_000,
|
||||||
)
|
)
|
||||||
result = await BuildImage.open(pic).resize(0.5)
|
result = await BuildImage.open(pic).resize(0.5)
|
||||||
await result.save(SUPERUSER_HELP_IMAGE)
|
await result.save(SUPERUSER_HELP_IMAGE)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user