当我尝试使用twitter4j通过搜索关键字(sports + exclude:转推)来获取公开推文时,我收到以下错误:
420:Returned by the Search and Trends API when you are being rate limited (https:
//dev.twitter.com/docs/rate-limiting).
Returned by the Streaming API:
Too many login attempts in a short period of time.
Running too many copies of the same application authenticating with the same acc
ount name.
{"error":"You have been rate limited. Enhance your calm."}
Relevant discussions can be found on the Internet at:
http://www.google.co.jp/search?q=d35baff5 or
http://www.google.co.jp/search?q=0877c84f
TwitterException{exceptionCode=[d35baff5-0877c84f], statusCode=420, retryAfter=51
1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.6}
at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:185
- Unable to search keyword = Query{query='sports OR +exclude:retweets', lang='n
ull', locale='null', maxId=-1, rpp=-1, page=15, since='null', sinceId=-1, geocode
='null', until='null', resultType='null'} You have been rate limited. Enhance your calm
任何人都可以告诉我为什么即使我只进行搜索操作,我也会这样做? API有问题吗?
答案 0 :(得分:0)
正如错误所示,您似乎正在受到速率限制。你连续多次运行这个吗?您是否经常连接?