def get_user_tweets(self, username, since_id=None):
"""
Download all tweets for an user
Max is around 3200 tweets
"""
if self.api is None:
self._authenticate()
tweets = []
if since_id:
cursor = tweepy.Cursor(self.api.user_timeline, screen_name=username, since_id=since_id)
else:
cursor = tweepy.Cursor(self.api.user_timeline, screen_name=username)
for item in cursor.items():
tweets.append(item)
return tweets
评论列表
文章目录