从字符串获取
String html = "<html><head><title>Java爬虫</title></head>"
+ "<body>内容部分</body></html>";
Document doc = Jsoup.parse(html);
从网址简单获取
Document doc = Jsoup.connect("http://example.com/").get();
从网址获取
Document doc = Jsoup.connect("http://example.com";)
.data("query", "Java")
.userAgent("Mozilla")
.cookie("auth", "token")
.timeout(3000)
.post();
从文件获取
Document doc = Jsoup.parse(file, "UTF-8");