Package org.vietspider.html.renderer

Examples of org.vietspider.html.renderer.NodeComparator


      if(hasLink(children.get(i))) list.add(children.get(i));
    }
    if(list.size() < 3) return false;
    HTMLNode node = list.get(0);
   
    NodeComparator nodeComparator = new NodeComparator();
    int counter = 1;
    int onlyLinkCounter = onlyLink(node) ? 1 : 0;
    for(int i = 1; i < list.size(); i++) {
      HTMLNode n = list.get(i);
      if(onlyLink(n)) onlyLinkCounter++;
      if(!nodeComparator.compare(node, n)) continue;
      counter++;
    }
   
    int rate = (counter*100)/list.size();
    if(rate >= 85) return true;
View Full Code Here

TOP

Related Classes of org.vietspider.html.renderer.NodeComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.