python - TweePy For Loop not looping all data -


use code snippet :

user = api.get_user('xxxx') print(user.followers_count) in user.friends():     print(i.screen_name) 

result follower count 700 why when looping data show 21 row data?

whilst getting names of followers of user possible banned exceeding rate limits quickly.

the following code tell how many followers user has , list username of people follow user.

username = 'keely_bro' userid = api.get_user(username) print('user followed ' + str(userid.followers_count) + ' people') print('usernames of followers: ') allfollowers in tweepy.cursor(api.followers_ids, screen_name=username).pages():     followernames = [userid.screen_name userid in api.lookup_users(allfollowers)]     follow in followernames:         print(follow) 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -