Package org.eweb4j.spiderman.xml

Examples of org.eweb4j.spiderman.xml.Rules


public class Util {
 
  public static Target isTargetUrl(Task task) throws Exception{
    for (Target target : task.site.getTargets().getTarget()){
      Rules rules = target.getUrlRules();
      if (UrlRuleChecker.check(task.url, rules.getRule(), rules.getPolicy())){
        if (task.target == null)
          task.target = target;
        return target;
      }
    }
View Full Code Here


    if (moveUrl != null){
      if (!moveUrl.equals(task.url))
        urls.add(moveUrl);
    }
   
    Rules rules = site.getTargets().getSourceRules();
    boolean isDig = false;
    if (rules != null && rules.getRule() != null && !rules.getRule().isEmpty()){
      //用来记录分页里已经解析的url
      Set<String> visitedUrls = new HashSet<String>();
      visitedUrls.add(task.url);
     
      for (Rule r : rules.getRule()){
        Model digModel = r.getDigUrls();
        if (digModel == null)
          continue;
        if (!isDig)
          isDig = true;
View Full Code Here

TOP

Related Classes of org.eweb4j.spiderman.xml.Rules

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.