我有一些代码跟随每个人,当他们跟着我时,他们会回复:
import twitter
from sets import Set
try:
api = twitter.Api(consumer_key='',
consumer_secret='',
access_token_key='',
access_token_secret='')
following = api.GetFriends()
friendNames = Set()
for friend in following:
friendNames.add(friend.screen_name)
followers = api.GetFollowers()
for follower in followers:
if (not follower.screen_name in friendNames):
api.CreateFriendship(follower.screen_name)
except Exception as exc:
print('generated an exception: %s' % (exc))
这会引发以下错误:
generated an exception: [{'message': 'Rate limit exceeded', 'code': 88}]
我知道他们是一个限制,你可以通过API使用此代码每小时跟踪多少关注者,但是我已经手动跟踪了所有关注者,但仍然遇到了同样的错误。谁能看到这里的问题是什么?
由于