Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/303.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Tweepy获得Python追随者列表的最佳方法_Python_Twitter_Tweepy - Fatal编程技术网

使用Tweepy获得Python追随者列表的最佳方法

使用Tweepy获得Python追随者列表的最佳方法,python,twitter,tweepy,Python,Twitter,Tweepy,有没有比这更好的方法通过Tweepy获得追随者名单的屏幕名称: for follower in api.followers_ids('twitter'): print api.get_user(follower).screen_name 我认为这样更有效: for user in tweepy.Cursor(api.followers, screen_name="twitter").items(): print user.screen_name 仅供参考,它使用twitter

有没有比这更好的方法通过Tweepy获得追随者名单的屏幕名称:

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

我认为这样更有效:

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

仅供参考,它使用twitter API调用。

当尝试使用此代码段时,我得到“AttributeError:'API'对象没有属性'followers'”。您使用的是什么
tweepy
版本?直接从github安装最新的
tweepy
版本。伙计,这些不适用于600K或1MM等跟随者编号…如何提取这么多跟随者ID??有人真的知道吗?@dave没有,每次超过5000个名字的请求你都要等60秒