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"