From 171875871316196dfc7cd0de32713cb2a982ccac Mon Sep 17 00:00:00 2001 From: XianYuDaXian Date: Wed, 4 Mar 2026 00:12:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20NSFW=20=E6=8E=A5=E5=8F=A3=20result=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=8C=85=E5=90=AB=20post=5Fid=20=E4=BB=A5?= =?UTF-8?q?=E4=BE=BF=E5=AE=A2=E6=88=B7=E7=AB=AF=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/v1/nsfw.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/api/v1/nsfw.py b/app/api/v1/nsfw.py index 6f85256..84ae02b 100644 --- a/app/api/v1/nsfw.py +++ b/app/api/v1/nsfw.py @@ -615,8 +615,17 @@ async def _generate_nsfw_inner(data: NSFWRequest) -> Dict[str, Any]: clean_links.append(cu) lines = ["返回链接:"] - for idx, u in enumerate(clean_links, 1): - lines.append(f"{idx}. {u}") + for idx, u in enumerate(images, 1): + lines.append(f"{idx}. (Image) {u}") + + for idx, item in enumerate(video_results, 1): + v_url = _clean_url(item.get("url", "")) + p_id = item.get("post_id", "") + if v_url: + msg = f"{idx}. (Video) {v_url}" + if p_id: + msg += f" (post_id: {p_id})" + lines.append(msg) response_payload["result"] = "\n".join(lines) return response_payload