我有一个java代码示例
response = Jsoup.connect(url1)
.method(Connection.Method.GET)
.execute();
response = Jsoup.connect(url1)
.data("__EVENTTARGET", "")
.data("__EVENTARGUMENT", "")
.data("__VIEWSTATE", loginPage.getElementById("__VIEWSTATE").val())
.data("__VIEWSTATEGENERATOR", loginPage.getElementById("__VIEWSTATEGENERATOR").val())
.data("ctl00$ContentPlaceHolder1$ctl00$txtChonHK", "20192")
.data("ctl00$ContentPlaceHolder1$ctl00$btnChonHK", "Xem")
.userAgent(userAgent)
.timeout(0)
.cookies(response.cookies())
.method(Connection.Method.POST)
.execute();
Document doc = response.parse();
System.out.println(doc.getElementsByClass("row-diemTK").html());
结果是:result(我没有修复unicode错误)问题是如何使用jsoup仅从td bar提取纯文本数据?
暂无答案!
目前还没有任何答案,快来回答吧!