mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-25 00:24:30 +00:00
zpr 修复路径错误
This commit is contained in:
parent
bf17332392
commit
56fe0b87da
@ -39,7 +39,7 @@ async def get_result(message, request, r18=2):
|
||||
for i in range(5):
|
||||
urls = result[i]['urls'][size].replace('i.pixiv.re', pixiv_img_host)
|
||||
img_name = f"{result[i]['pid']}_{i}.jpg"
|
||||
file_path = zpr_path / img_name
|
||||
file_path = data_path / img_name
|
||||
try:
|
||||
img = await request.get(urls, headers=headers, timeout=10)
|
||||
if img.status_code != 200:
|
||||
@ -73,5 +73,5 @@ async def zpr(client: Client, message: Message, request: AsyncClient):
|
||||
"此群组不允许发送媒体。" if e.ID == "CHAT_SEND_MEDIA_FORBIDDEN" else f"发生错误:\n`{e}`")
|
||||
except Exception as e:
|
||||
return await message.edit(f"发生错误:\n`{e}`")
|
||||
shutil.rmtree(zpr_path)
|
||||
shutil.rmtree("data/zpr")
|
||||
await message.safe_delete()
|
||||
|
Loading…
Reference in New Issue
Block a user