Skip to content

Commit

Permalink
Update getnews.py
Browse files Browse the repository at this point in the history
  • Loading branch information
congxuma committed May 7, 2023
1 parent 1161404 commit f97fe59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/plugin_getnews/getnews.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def on_handle_context(self, e_context: EventContext):
news_date = news_json['data']['last_update']

output = news_date + ' 更新\n'
for i in range(15):
for i in range(min(len(news_json['data']['list']), 15)):
item = f'%2s.' %str(i+1) + news_json['data']['list'][i]['title'] + ' / '+ news_json['data']['list'][i]['other'] + '\n'
output= output + item

Expand Down Expand Up @@ -156,5 +156,5 @@ def on_handle_context(self, e_context: EventContext):
# e_context.action = EventAction.CONTINUE # 事件继续,交付给下个插件或默认逻辑

def get_help_text(self, **kwargs):
help_text = "输入今日新闻,获取今天新闻\n输入今日图片,获取今日摄影"
help_text = "输入今日新闻,获取今天新闻\n输入今日图片,获取今日摄影\n输入微博,获取微博热榜"
return help_text

0 comments on commit f97fe59

Please sign in to comment.