auth.py
import tweepy
consumer_key = ""
consumer_secret = ""
access_token = ""
access_token_secret = ""
At that time
auth.py
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
auth.py
auth = tweepy.AppAuthHandler(consumer_key, consumer_secret)
api = tweepy.API(auth)
It will be. User authentication and app authentication have completely different rate limits! https://developer.twitter.com/en/docs/basics/rate-limits
Also, it is in the form of api =, which is an API object in tweepy and is http://docs.tweepy.org/en/latest/api.html print(api.rate_limit_status()) If you do like The number of remaining requests will be returned like this (JSON). And when you want to search for tweets, If you open the reference like this, you can see various things.
Thank you very much.
fixed phrase I'm always on Twitter (@ kenkensz9) so if you have any questions I hope you like it!
Recommended Posts