Package org.vietspider.chars

Examples of org.vietspider.chars.URLUtils


      searchLink(list, fragment.getChildNodes());
    }
   
    String home = browser.getUrl();
    URLUtils urlUtils = new URLUtils();
    URL url = null;
    try {
      url = new URL(home);
    } catch (Exception e) {
    }

   
    if(list.size() > 0)  {
      for(int i = 0; i < list.size(); i++) {
        list.set(i, urlUtils.createURL(url, list.get(i)));
      }
      return list.toArray(new String[list.size()]);
    }

    String link  = BrowserMenu.getLink(element);
    if(link == null) return new String[0];
    link = urlUtils.createURL(url, link);
    return new String[]{link};
  }
View Full Code Here


        addParam(params, name, value.trim());
      }
      //end for
    }
   
    URLUtils urlUtils = new URLUtils();
    address = urlUtils.createURL(url, address).trim();
    address = urlUtils.getCanonical(address);
   
    referer = url.toString();
    HttpHost httpHost = webClient.createHttpHost(address);
    HttpPost httpPost = webClient.createFormPostMethod(address, referer, params);
//    long start = System.currentTimeMillis();
View Full Code Here

      }
      if(value == null) value = "";
      params.add(new BasicNameValuePair(name, value.trim()));
    }
   
    URLUtils urlUtils = new URLUtils();
    address = urlUtils.createURL(url, address).trim();
    address = urlUtils.getCanonical(address);
   
//    System.out.println(" chuan bi login rui " + address);
    referer = url.toString();
    HttpHost httpHost = webClient.createHttpHost(address);
//    HttpResponse response2 =
View Full Code Here

          params.add(new BasicNameValuePair(name, value == null ? "" : value.trim()));
        }
      }
    }
   
    URLUtils urlUtils = new URLUtils();
    address = urlUtils.createURL(loginUrl, address).trim();
    address = urlUtils.getCanonical(address);
   
    referer = loginUrl.toString();
    WebClient webClient = httpMethod.getWebClient();
    HttpHost httpHost = webClient.createHttpHost(address);
    HttpPost httpPost = webClient.createFormPostMethod(address, referer, params);
View Full Code Here

  private final static Map<String, String> linkAttributeMap = new HashMap<String, String>(4);
  private final static Map<String, String> linkAttributeFullMap = new HashMap<String, String>(5);
  private final static Map<String, String> pageAttributeFullMap = new HashMap<String, String>(5);
 
  public HyperLinkUtil() {
    urlCreator  = new URLUtils();
    siteLinkVerifier = new SiteLinkVerifier();
    imageLinkVerifier  = new ImageLinkVerifier();
    normalLinkVerifier = new NormalLinkVerifier();
    jsVerifier = new JavaScriptVerifier();
View Full Code Here

 
  private final static Map<String, String> linkAttributeMap = new HashMap<String, String>(4);
  private final static Map<String, String> linkAttributeFullMap = new HashMap<String, String>(5);
 
  public HyperLinkUtilBak() {
    urlCreator  = new URLUtils();
    siteLinkVerifier = new SiteLinkVerifier();
    imageLinkVerifier  = new ImageLinkVerifier();
    normalLinkVerifier = new NormalLinkVerifier();
    jsVerifier = new JavaScriptVerifier();
View Full Code Here

TOP

Related Classes of org.vietspider.chars.URLUtils

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.