Twitter API has a rate limit of 15 requests per 15 minutes.
I am trying to use python to run through and compile a list of my followers, but for some reason, the rate limit maxes when only 300 followers are logged. I've read that the max should be closer to 5,000. Where am I going wrong?
If I have thousands, or even more than 1 million followers and am trying to print a list of each follower, how can I maximize the number of followers that Python/twitter returns before hitting the rate limit?
Here is the code I have so far:
followers = tweepy.Cursor(client.followers, id=screenName)
for follower in followers.items():
info=[]
name =follower.name
screen_name = follower.screen_name
userId = userId + 1
info.append(userId)
info.append(name)
info.append(screen_name)
csvFile = open('followers.csv','a')
newFile =csv.writer(csvFile) #imported csv
newFile.writerow(info)
#close file
csvFile.close()