python - Get all friends for multiple given users using tweepy -
I am trying to compile a list of all the friends who my friends have on Twitter So many users will be given users. I
I use the cursor to return all the following users, then try to print all the user's friends
< Code> Friends for tweepy.Cursor (api.friends) .items (): print friend.screen_name user = api.get_user (str (friend.screen_name)) for f2 in user.friends (): print f2.screen_name < / Code>Although I'm already running on many issues, only 20 friends for each user (
user.friend ) Is printed. The second issue is that I am getting the rate limit error.
If you, you will see that you can request more than 5,000 friends at a time.
There is no way to avoid the rate of 15 every 15 minutes.
Comments
Post a Comment