From 99d53cd94597681008d98273e42340407b9a7b50 Mon Sep 17 00:00:00 2001 From: bigfa <4398929@qq.com> Date: Wed, 24 Apr 2024 14:16:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=85=BC=E5=AE=B9=E7=BD=91=E9=A1=B5?= =?UTF-8?q?=E7=AB=AF=E4=B8=8A=E4=BC=A0=E7=9A=84=E5=9B=BE=E7=89=87=E5=8E=9F?= =?UTF-8?q?=E5=9B=BE=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- media_platform/xhs/help.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/media_platform/xhs/help.py b/media_platform/xhs/help.py index 67fc7d3..8227def 100644 --- a/media_platform/xhs/help.py +++ b/media_platform/xhs/help.py @@ -273,7 +273,8 @@ def get_img_urls_by_trace_id(trace_id: str, format_type: str = "png"): def get_trace_id(img_url: str): - return img_url.split("/")[-1] + # 浏览器端上传的图片多了 /spectrum/ 这个路径 + return f"spectrum/{img_url.split("/")[-1]}" if img_url.find("spectrum") != -1 else img_url.split("/")[-1] if __name__ == '__main__':