bird.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:analyst-scripts 作者: Te-k 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号