[英]extracting data java jsoup html
i want to extract the text "Banking and credit" from the link http://ica-ap.coop/AboutUs/association-asian-confederation-credit-unions-accu 我想从链接中提取“银行和信贷”一文http://ica-ap.coop/AboutUs/association-asian-confederation-credit-unions-accu
i tried with this code : 我试过这个代码:
Document doc = Utils.getFromURL("http://ica-ap.coop/AboutUs/association-asian-confederation-credit-unions-accu");
Elements e = doc.select("div.field-items div.field-item.even table[width=523]");
Element ab = e.select("thead tr td p").first();
System.out.println(ab.text());
but it dosnt work. 但它很有用。
Do have an idea? 有想法吗?
Document doc = (Document) Jsoup.connect("http://ica-ap.coop/AboutUs/association-asian-confederation-credit-unions-accu").get();
Elements e = doc.select("div.field-items div.field-item.even table[width=523]");
Element ab = e.select("tbody tr:nth-child(1) p").last(); //content is tbody not thead
System.out.println(ab.text());
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.