I am trying to fetch a html doc using JSoup but it returns incomplete HTML.
Document doc = Jsoup.connect("http://stackoverflow.com/questions/79923");
what could be wrong?
I am trying to fetch a html doc using JSoup but it returns incomplete HTML.
Document doc = Jsoup.connect("http://stackoverflow.com/questions/79923");
what could be wrong?
The maximum size of the document needs to be extended. By default it sets the max limit to 1MB. By setting it to 0 it will have an unlimited size.
Connection connection = Jsoup.connect(String url);
connection.maxBodySize(0);
Document doc = connection.get();
See the Jsoup documentation: http://jsoup.org/apidocs/org/jsoup/Connection.html#maxBodySize(int)
which is correct.
– user1493834 Nov 17 '13 at 07:21