What I ended up doing was .show_user(user_id=twitter_id)
which returns (among other things) the followers count via ['followers_count']
Twython get followers count
Domanda
Is there an easy way to get the number of followers an account has without having to loop through cursors? I'm looking for a simple function call which will return to me just the number of followers the use with a given Twitter ID has.
Just looking for the physical number not access to anything else
Soluzione
Altri suggerimenti
You can use get users/lookup endopoint to query up to 100 of screen names or user ids, followers_count
is included as well.
In twython it would be lookup_user
api function.
Returns fully-hydrated user objects for up to 100 users per request, as specified by comma-separated values passed to the user_id and/or screen_name parameters.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow