티스토리 뷰

twitter4j 를 이용해서 트위터 정보를 가져올때, 아래와 같은 메시지가 나올때가 있다.

 

400:The request was invalid. An accompanying error message will explain why.
This is the status code will be returned during rate limiting (https://dev.twitter.com/pages/rate-limiting).
error - Rate limit exceeded. Clients may not make more than 150 requests per hour.
request - /1/statuses/public_timeline.json?include_my_retweet=1&include_entities=true&include_rts=true
Relevant discussions can be on the Internet at:
 http://www.google.co.jp/search?q=72c73d0d or
 http://www.google.co.jp/search?q=0b98dc35
TwitterException{exceptionCode=[72c73d0d-0b98dc35], statusCode=400, retryAfter=1605,
rateLimitStatus=RateLimitStatusJSONImpl{remainingHits=0, hourlyLimit=150, resetTimeInSeconds=1341456,
secondsUntilReset=1605, resetTime=Thu Jul 05 11:44:00 KST 2012}, featureSpecificRateLimitStatus=null, version=2.2.5}
 at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:185)
 at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:65)
 at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:93)
 at twitter4j.TwitterImpl.get(TwitterImpl.java:1878)
 at twitter4j.TwitterImpl.getPublicTimeline(TwitterImpl.java:150)

 

트위터 정보를 가져올 때 제한이 있음. 
위 에러메시지 중에 보이듯이 https://dev.twitter.com/pages/rate-limiting 주소로 가서 자세히 읽어보면

 

Unauthenticated calls are permitted 150 requests per hour.
Unauthenticated calls are measured against the public facing IP of the server or device making the request.

 

1시간에 150번 조회가 가능하다고 나와있긴 한거 같은데..

1분당 2번씩 데이터를 가져와(시간당 120번) DB에 저장해도 위와 같은 에러가 나서 좀 의문이다.

 

결국엔 편히 돌리려고 1분당 1번만 읽어오기로 해서 샘플데이터 채집중.



반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함