java - Jsoup, Reddit, OAuth2, and 429 HTTP Errors -


so i'm trying write executable jar small subreddit run.

i have post jsoup connects , reads urls on page. in method, connects urls (that comments on post) , gets html comments , saves them hashmap.

this great getting 429 http error. resolve this, added short 5 second wait. i'm getting sockettimeoutexception "read timed out". once lowered time down 3 seconds, bouncing between two.

now run few reddit bots python , i'm able make lot more requests i'm doing here. have single bot makes thousands of requests every minute. know it's possible make these requests.

my question is, how able make multiple requests reddit , avoid 429 http error? i'm using jsoup connect , read html.

while i'm sure connecting reddit via. oauth2 api fix issues, have no idea how use oauth2 in java (i use wrapper in python it's fair don't know @ all) , don't know how use jsoup.

my question is, how able make multiple requests reddit , avoid 429 http error?

you answer yourself:

while i'm sure connecting reddit via. oauth2 api fix issues,

as specified in the api documentation, twice many requests per second if authenticated using oauth.

have looked around examples on how handle oauth flows in java?

you might find easier use 1 of the wrapper libraries java, instead of handling yourself.


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -