直接使用 fstring 生成链接

This commit is contained in:
2024-06-10 02:35:07 +08:00
parent f9b11895e2
commit 92159e93b8
3 changed files with 3 additions and 8 deletions

View File

@@ -1,5 +1,3 @@
from urllib.parse import urlunparse
from nonebot_plugin_alconna.uniseg import UniMessage
from nonebot_plugin_orm import get_session
from nonebot_plugin_session import EventSession # type: ignore[import-untyped]
@@ -60,5 +58,5 @@ async def _(
)
) as page_hash:
await UniMessage.image(
raw=await screenshot(urlunparse(('http', get_self_netloc(), f'/host/{page_hash}.html', '', '', '')))
raw=await screenshot(f'http://{get_self_netloc()}/host/{page_hash}.html')
).finish()