}
return false;
}
private HTMLNode searchPageNode2(HTMLNode node) {
NodeIterator iterator = node.iterator();
HTMLNode table = null;
while(iterator.hasNext()) {
HTMLNode n = iterator.next();
if(!n.isNode(Name.A)) continue;
List<HTMLNode> children = n.getChildren();
if(children == null
|| children.size() != 1
|| !children.get(0).isNode(Name.CONTENT)) continue;
String text = children.get(0).getTextValue();
try {
Integer.parseInt(text.trim());
table = upParent(n, Name.TABLE);
break;
} catch (Exception e) {
}
}
if(table == null) return null;
NodeHandler nodeHandler = new NodeHandler();
iterator = node.iterator();
while(iterator.hasNext()) {
HTMLNode n = iterator.next();
if(!n.isNode(Name.CONTENT)) continue;
String text = n.getTextValue().toLowerCase().trim();
if(text.startsWith("trang") || text.startsWith("page")) {
if(nodeHandler.count(text) < 5) return table;
}