From 3942356a17d9c38450c47ccf0750f91bb1d22841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=A5=E5=BE=AE?= Date: Sun, 21 Jun 2026 00:40:08 +0800 Subject: [PATCH] =?UTF-8?q?xiaoguo=5Fnews=5Fprocessor:=20=E6=AD=A3?= =?UTF-8?q?=E6=96=87=E5=8E=BB200=E5=AD=97=E9=99=90=E5=88=B6=EF=BC=8C?= =?UTF-8?q?=E5=85=A8=E6=96=87=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaoguo_news_processor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xiaoguo_news_processor.py b/xiaoguo_news_processor.py index e0393c5..8d361f3 100644 --- a/xiaoguo_news_processor.py +++ b/xiaoguo_news_processor.py @@ -97,7 +97,7 @@ def call_xiaoguo(articles): for a in articles: title = re.sub(r'\b\d{6}\b', '', a['title']).strip() title = re.sub(r'\s+', ' ', title) - content = (a.get('content') or '')[:200] + content = a.get('content') or '' # 给正文加标点分隔(akshare正文无标点,模型推理会卡) if content and not any(c in content for c in '。,!?;'): content = '。'.join([content[i:i+20] for i in range(0, len(content), 20)])