twitter_methods.py 文件源码

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

项目:pytwebot 作者: Alkesst 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号