Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Doc = Jsoup.connect(URL) failed.
public class Main {
public static void main (String ... args) {
Document doc = null;
String url = "http://178.128.242.32/test";
try {
doc = Jsoup.connect(url).get();
} catch (IOException e) {
e.printStackTrace();
}
Element textElem = doc.selectFirst("body");
String text = textElem.text();
System.out.println(text);
}
}
var doc = Jsoup.connect("http://178.128.242.32/test")
.get();
System.out.println(doc.text());
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question