def get_mentions_from_timeline(self):
"""Return a list of all the tweets from the home timeline"""
tweets = []
for status in tweepy.Cursor(self.api.home_timeline, include_entities=True).items(200):
if 'user_mentions' in status.entities:
tweets.append(str(status.user.screen_name) + " " + str(status.created_at) + "\n" + status.text)
mentions = []
for items in tweets:
if 'pytwe_bot' in items:
mentions.append(items)
return mentions
评论列表
文章目录