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
评论列表
文章目录