Document document = Jsoup.connect("some html url").get();
Elements catelist= document.select("TEXT");
以上代码未提供完整的html。
答案 0 :(得分:1)
默认情况下,最大主体大小限制为1MB。您可以使用maxBodySize(int)
更改默认值:
//for example to set the max body size to 20 MB
Document document = Jsoup.connect(some html url).timeout(0).maxBodySize(1024*1024*20).get();
//or set it to 0 to have an unlimited size
Document document = Jsoup.connect(some html url).timeout(0).maxBodySize(0).get();
答案 1 :(得分:0)
如果要整页的html代码 然后使用:
document.html();
如果您想要特定标签的html代码 然后使用:
catelist.html();