From d41eb2431f4d86c0af6594bec0f7c6cae1b07b25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Thu, 20 Aug 2026 15:40:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(wa):=20WA=E6=B6=88=E6=81=AFfile=5Furl?= =?UTF-8?q?=E4=BC=98=E5=85=88=E7=9B=B4=E8=BF=9EOSS=E7=9A=84file=E5=AD=97?= =?UTF-8?q?=E6=AE=B5(1:1=E5=9B=BE=E7=89=8793%=E6=9C=89URL)+=E5=AD=98?= =?UTF-8?q?=E9=87=8F=E5=9B=9E=E5=A1=AB7373=E8=A1=8C(=E5=B8=A6URL=206028/68?= =?UTF-8?q?04)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- yunke-server/app/scraper/whatsapp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yunke-server/app/scraper/whatsapp.py b/yunke-server/app/scraper/whatsapp.py index 8846e25..e9e67de 100644 --- a/yunke-server/app/scraper/whatsapp.py +++ b/yunke-server/app/scraper/whatsapp.py @@ -548,7 +548,9 @@ def _normalize_whatsapp_message(record: dict[str, Any]) -> dict[str, Any]: "type": normalize_whatsapp_type(raw_type), "type_raw": coerce_int_or_none(raw_type), "text": record.get("content"), - "file_url": record.get("mediaName"), + # file 常带直连 OSS URL(1:1 图片实测 93% 覆盖,2026-08-20),优先于 + # mediaName 不透明名 + "file_url": record.get("file") or record.get("mediaName"), "refer_msg": refer_msg, "sender_name": record.get("nickName"), "timestamp": timestamp,