python - 为什么我从 twitter api 收到 Rate limit exceeded 错误 88?
问题描述
我只从我自己的时间线发送 4 条推文的请求。根据 twitter 网站,我应该能够使用我的 v2 Standard Basic 访问帐户每 15 分钟收到数百条推文。我看不出我是如何通过请求 4 条推文来达到这个限制的,而且我的推特账户本身只有 18 条推文(不知道这些是否包括在内,因为我只请求了其中的 4 条)。
我将展示我的代码,以便您了解我是如何使用 Twitter API 的。
这是获取 4 条推文的函数:
def toon_tweets():
r = api.request('statuses/home_timeline', {'count':4})
tweet_lijst = []
for item in r.get_iterator():
if 'text' in item:
tweet_lijst.append(item['text'])
return tweet_lijst
我通过以下方式从另一个应用程序调用此函数:
tweets_label = Label(root,fg = "#0313fc" , bg = "#ffcc00",
#text = ns_m3_testB.toon_tweets(),
text = "{}\n {}\n {}\n {}".format(ns_m3_testB.toon_tweets()[0], ns_m3_testB.toon_tweets()[1], ns_m3_testB.toon_tweets()[2], ns_m3_testB.toon_tweets()[3]),
font = "none 14 bold",
justify = "left")
我不知道这么简单的请求怎么会导致我超过速率限制。
解决方案
推荐阅读
- c# - C#基于字符串拆分字符串并获取拆分值并按值分隔
- heroku - 将 Sails 应用程序部署到 Heroku 时找不到资产
- c# - 数据网格中对象的矩阵表示
- java - Eclipse 内置 jar 导出选项 vs Maven 程序集插件
- python - curl 结果和 Python 请求结果之间的差异
- java - Apache Ignite 中集群之间的数据复制
- css - 在 StackOverflow 上搜索后,Css 缩放文本仍然模糊
- conditional-breakpoint - 如何在spyder中设置条件断点?
- angular - Angular 5 空闲时间过长
- mongodb - 如何在 Spring Data Mongodb 中使用 ArrayOperation 的 Size 类进行聚合?