def get_news(self, ctx):
"""Grab a news story"""
if common.twitter is None:
return
shuffle(common.news_handles)
found_art = False
while not found_art:
source = common.news_handles.pop(0)
common.news_handles.append(source)
tweet_text = "It looks like @" + source + " is reporting:"
rt_text = "It looks like @" + source + " is retweeting:"
try:
await get_last_tweet(source, tweet_text, rt_text, ctx)
except TwythonError:
print("Error in get_news, trying another source")
else:
found_art = True
return
评论列表
文章目录