【发布时间】:2014-08-28 01:32:57
【问题描述】:
我尝试打印我的推特好友列表。我有 112 个朋友,但我只能打印 20 个朋友的网名。是不是因为一些 API 限制/朋友之间的差异和关注/概念错误。这是我的代码:
import tweepy
import sys
import time
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
data = api.get_user('')
count = 0
for friend in data.friends():
print 'Friend:'+ friend.screen_name
count=count+1
if count%5==0:
print count
time.sleep(20)
我的解释器没有抛出任何错误。
【问题讨论】:
标签: python-2.7 tweepy