Package com.iqbon.spider.domain

Examples of com.iqbon.spider.domain.Replace


  public void testUpdateSource() {
    Source s = sourceDao.querySourceByUrl(source.getUrl());
    SourceMatcher matcher = new SourceMatcher();
    matcher.setLinkParent("li[class=list-right]");
    matcher.setDescription("�Ҳ�����");
    Replace replace = new Replace();
    replace.setMatcher("<div class=\"gg200x300\">[\\s\\S]*?</div>");
    replace.setReplacement("");
    Replace replace2 = new Replace();
    replace2.setMatcher("<a [\\s\\S]*?>");
    replace2.setReplacement("");
    Replace replace3 = new Replace();
    replace3.setMatcher("</a>");
    replace3.setReplacement("");
    List<Replace> replaces = new ArrayList<Replace>();
    List<SourceMatcher> matchers = new ArrayList<SourceMatcher>();
    matchers.add(matcher);
    replaces.add(replace);
    replaces.add(replace2);
View Full Code Here

TOP

Related Classes of com.iqbon.spider.domain.Replace

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.