java 异常

private static void Infoextract(String page) throws XPatherException,
IOException {
String url;
Bean bean = new Bean();
String charset = "GBK";
for (int i = 0; i < list.size(); i++) {
url = list.get(i);
if(url.indexOf("pic") != -1) continue;
try{
bean = Clean.Clean(url, charset, xpath);
Beans.add(bean);
System.out.println(url);
}catch(Exception e){
e.printStackTrace();
continue;
}
}
}

public Bean Clean(String url, String charset, ArrayList<Xpath> paths)
throws XPatherException, IOException, java.net.UnknownHostException {

HtmlCleaner cleaner = new HtmlCleaner();

TagNode node = cleaner.clean(new URL(url));

}

posted on 2014-03-18 13:24  agilezing  阅读(128)  评论(0编辑  收藏  举报

导航