Python:如何只在第一个';x';清单很长的项目;用tweepy编写Twitter机器人
这里没有。我相信这是一个简单的问题。我正在和tweepy写一个推特机器人。我遇到了困难。当我调用api创建追随者列表时,出现了“超出速率限制”错误。据我所知,这是因为Twitter对api调用施加了限制 我的代码片段:Python:如何只在第一个';x';清单很长的项目;用tweepy编写Twitter机器人,python,twitter,tweepy,Python,Twitter,Tweepy,这里没有。我相信这是一个简单的问题。我正在和tweepy写一个推特机器人。我遇到了困难。当我调用api创建追随者列表时,出现了“超出速率限制”错误。据我所知,这是因为Twitter对api调用施加了限制 我的代码片段: for follower in tweepy.Cursor(api.followers).items(): follower_ids.append(follower.id) 我的问题:如何从tweepy.Cursor(api.followers.items())中获取第
for follower in tweepy.Cursor(api.followers).items():
follower_ids.append(follower.id)
我的问题:如何从tweepy.Cursor(api.followers.items())中获取第一个“x”项?在范围内似乎是显而易见的解决办法,但我无法让它发挥作用 您可以这样限制tweepy的光标限制:
# Only iterate through the first 200 followers
for follower in Cursor(api.followers).limit(200):
follower_ids.append(follower.id)
这在文档中非常明确,请参见。您可以像这样限制tweepy的光标限制:
# Only iterate through the first 200 followers
for follower in Cursor(api.followers).limit(200):
follower_ids.append(follower.id)
这在文档中非常明确,请参见。您可以像这样限制tweepy的光标限制:
# Only iterate through the first 200 followers
for follower in Cursor(api.followers).limit(200):
follower_ids.append(follower.id)
这在文档中非常明确,请参见。您可以像这样限制tweepy的光标限制:
# Only iterate through the first 200 followers
for follower in Cursor(api.followers).limit(200):
follower_ids.append(follower.id)
这在文档中非常明确,请参见。您将如何使用它来获取下一个200?您将如何使用它来获取下一个200?您将如何使用它来获取下一个200?您将如何使用它来获取下一个200?