what I´m doing is this:
Document page = Jsoup.connect(url).timeout(0).get();
Elements elements= pageSubforum.select(elements);
Sometimes this is working, but often I get a
java.net.SocketTimeoutException
How can I handle this?
what I´m doing is this:
Document page = Jsoup.connect(url).timeout(0).get();
Elements elements= pageSubforum.select(elements);
Sometimes this is working, but often I get a
java.net.SocketTimeoutException
How can I handle this?
I could actually solve it. The problem was not the connection, it was the parsing method.
int timeout = 0;
Jsoup.parse(url, timeout);
The timeout has to be set to zero, so Jsoup interprets it as an infinite timeout. Hope I can help someone with this in the future.