From f8332f77616e2cc2a568d5103882306c1d8fb265 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sun, 12 May 2024 21:12:27 +0800 Subject: [PATCH] a? --- ica-rs/plugins/bmcl.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ica-rs/plugins/bmcl.py b/ica-rs/plugins/bmcl.py index a69e68e..cde40db 100644 --- a/ica-rs/plugins/bmcl.py +++ b/ica-rs/plugins/bmcl.py @@ -264,9 +264,13 @@ def bangbang_img(msg: IcaNewMessage, client: IcaClient) -> None: return raw_name = data.url.split("/")[-1] img_suffix = raw_name.split(".")[-1] + # mine 映射一下 + if img_suffix.lower() in ("jpeg", "jpg"): + img_suffix = "jpeg" img_name = raw_name[:-len(img_suffix) - 1] img_name = urllib.parse.unquote(img_name) mime_format = f"image/{img_suffix}" + client.info(f"获取到随机怪图: {img_name} {img_suffix}") reply = msg.reply_with(img_name) reply.set_img(data.content, mime_format, True) client.send_message(reply)