调整百度新闻,加入#号

This commit is contained in:
liuwei
2025-02-14 08:58:48 +08:00
parent 4d1811ce23
commit e50ef0ce06
5 changed files with 173 additions and 56 deletions

View File

@@ -104,7 +104,7 @@ class News(object):
title = article['word']
# url = article['url']
# 使用f-string格式化字符串并添加到output中
output += f"{index}. : {title}\n"
output += f"{index} :#{title}\n"
# 输出最终的字符串(这里只是为了展示,实际上你可以根据需要处理这个字符串)
return output