我想在此链接中提取两个特定div的内容 “http://tanitjobs.com/display-job/89658/Responsable-Production-CALL-CENTER.html?searchId=1428594845.2138&page=1”
Lieu 的内容和 Expire le
答案 0 :(得分:0)
试试这个:
String url = "http://tanitjobs.com/display-job/89658/Responsable-Production-CALL-CENTER.html?searchId=1428594845.2138&page=1";
Document doc = Jsoup.connect(url).get();
String lieu = doc.select("div.displayField").last().text();
String expireLe = doc.select("div.displayFieldBlock > h3").last().parent().ownText();
System.out.println(lieu);
System.out.println(expireLe);
输出:
DJERBA
2015-05-04