crawler.py 文件源码

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

项目:neogoso 作者: neogoso 项目源码 文件源码
def authenticate(self):
        ''' Push the keys and tokens to OAuth to get the
        access to the API
        '''
        # set OAuth
        self.auth = tweepy.OAuthHandler(
            self.appinfo['consumer'],
            self.appinfo['consumer_secret'])

        self.auth.set_access_token(
            self.appinfo['token'],
            self.appinfo['token_secret'])

        # TODO : Encrypt the contents of appinfo.json

        # API access
        self.api = tweepy.API(
            self.auth,
            wait_on_rate_limit = self.wait_ratelimit
        ) # TODO : Bypass the rate limit of Twitter API
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号