The best way to get a list of followers in Python with Tweepy

前端 未结 1 822
清歌不尽
清歌不尽 2021-01-02 03:01

Is there a better way to get a list of followers screen names with Tweepy than this:

for follower in api.followers_ids(\'twitter\'):
    print api.get_user(f         


        
相关标签:
1条回答
  • 2021-01-02 03:36

    I think this is more efficient:

    for user in tweepy.Cursor(api.followers, screen_name="twitter").items():
        print user.screen_name
    

    FYI, it uses followers/list twitter API call.

    0 讨论(0)
提交回复
热议问题