Skip to content

Commit 63d6cab

Browse files
committed
✨ bg gm url fix & bump
1 parent b293e89 commit 63d6cab

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

nonebot_plugin_picstatus/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
if config.ps_only_su:
2828
usage += "\n注意:仅SuperUser可以使用此指令"
2929

30-
__version__ = "2.0.0.post3"
30+
__version__ = "2.0.0.post4"
3131
__plugin_meta__ = PluginMetadata(
3232
name="PicStatus",
3333
description="以图片形式显示当前设备的运行状态",

nonebot_plugin_picstatus/bg_provider.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ async def gm():
4646
proxies=config.proxy,
4747
timeout=config.ps_req_timeout,
4848
) as cli:
49-
url = (
50-
(await cli.get("https://api.gumengya.com/Api/DmImg"))
49+
return (
50+
(
51+
await cli.get(
52+
"https://api.gumengya.com/Api/DmImg",
53+
params={"format": "image"},
54+
)
55+
)
5156
.raise_for_status()
52-
.json()["data"]["url"]
57+
.content
5358
)
54-
return (await cli.get(url)).raise_for_status().content
5559

5660

5761
@bg_provider

0 commit comments

Comments
 (0)