From 70b704b16f21e25bd8e26bf670442abde24582a7 Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 20 Feb 2025 09:19:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E9=97=BB=E6=A0=87=E9=A2=98=20?= =?UTF-8?q?=E5=B0=86=E7=A9=BA=E6=A0=BC=E6=9B=BF=E6=8D=A2=E4=B8=BA=5F=20?= =?UTF-8?q?=E8=BF=99=E6=A0=B7=E5=AD=90=E6=96=B9=E4=BE=BF=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E4=B8=AD=E7=9B=B4=E6=8E=A5=E7=82=B9=E5=87=BB=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/func_news.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/func_news.py b/base/func_news.py index 0c1a920..2817e70 100644 --- a/base/func_news.py +++ b/base/func_news.py @@ -101,7 +101,7 @@ class News(object): str = post['data']['cards'][0]['content'] # 遍历列表,并格式化每个字典的title, url,然后添加到output字符串中 for index, article in enumerate(str, start=1): - title = article['word'] + title = article['word'].replace(" ", "_") # url = article['url'] # 使用f-string格式化字符串,并添加到output中 output += f"{index} :#{title}\n"