Search code examples
urljsoup

Jsoup connection URL


Every time I run Jsoup.connect(url).get(), does that call generate any kind of warning to the page that I connect to?

I mean, if I execute Document doc = Jsoup.connect(url).get() every ten seconds, do I have some risk of receiving some kind of error from the server at some point?


Solution

  • I ask you the following question, every time I do Jsoup.connect (url) .get (), does that call generate any kind of warning to the page that I connect to?

    Generally, no! The only thing that is happening most likely is, that the server you are connecting to will log the access using your IP address, User agent (and possibly other stuff).

    i mean, if i execute Document doc = Jsoup.connect (url) .get (); every ten seconds, have i some risk of receiving some kind of error from the server at some point?

    Yes indeed, that's quite possible but it totally depends. Some server will blacklist you, in case you are sending too many requests, others don't. Also in general 10 seconds between each request should be fine, I guess. You will see if it works out.

    Based on my experience, it never happend to me, that by using regularly Jsoup.connect(url).get(); on the same resource I got banned or locked out.