// System.out.println(" chon cai thu " + index + " : "+ renderer.getScore()+ " : ");
return renderer;
}
public HTMLNode extractContent(HTMLDocument document, String url, boolean clean) throws Exception {
HTMLNode body = ContentRendererFactory.searchBody(document);
// PageExtractor pageExtractor = new PageExtractor();
// pageExtractor.filter(body, NodeChecker.createDefaultCheckers());
ContentRenderer renderer = ContentRendererFactory.createContentRenderer(body, url);
NodeRenderer nodeRenderer = extractContent(renderer);
if(nodeRenderer == null) return null;
List<HTMLNode> nodes = nodeRenderer.getContents();
// for(int i = 0; i< nodes.size(); i++) {
// System.out.println(nodes.get(i).getName() + " : ");
// }
HTMLNode value = parentUtil.getUpParent(nodes);
// ScoreCalculator.printNode(nodeRenderer);
// System.out.println("thay co cai na " + nodeRenderer.getScore() );
// java.io.File file = new java.io.File("F:\\Temp2\\web\\output\\a.txt");