oauth_handler.py 文件源码

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

项目:twitter_LDA_topic_modeling 作者: kenneth-orton 项目源码 文件源码
def manage_auth_handlers(auths):
    index = 0
    while True:
        api = auths[index]
        try:
            limit = api.rate_limit_status()
            status_limit = limit['resources']['statuses']['/statuses/user_timeline']['remaining']
            if status_limit > 180:
                return api
        except tweepy.TweepError as e:
            #print('manage_auth_handlers ' + str(e))
            pass
        finally:
            if index == (len(auths) - 1):
                index = 0
            else:
                index += 1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号