Package com.iqbon.spider.domain

Examples of com.iqbon.spider.domain.SourceMatcher


  @Before
  public void setUp() throws Exception {
    source.setUrl("http://home.163.com/special/latest/");
    source.setDescription("test");
    source.setContentMatcher("#js-epContent");
    SourceMatcher matcher = new SourceMatcher();
    matcher.setLinkParent("li[class=list-left]");
    matcher.setDescription("�������");
    matchers.add(matcher);
    source.setMatchers(matchers);
    source.setReplaces(replaces);
    sourceDao = (SourceDao) BeanFactory.getBean("sourceDao");
  }
View Full Code Here


  }

  @Test
  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]*?>");
 
View Full Code Here

  public void setUp() throws Exception {
    source.setUrl("http://home.163.com/special/latest/");
    source.setDescription("test");
    source.setContentMatcher("#endText");
    source.setId(new ObjectId());
    SourceMatcher matcher = new SourceMatcher();
    matcher.setLinkParent("li.list-left");
    matcher.setDescription("�������");
    matchers.add(matcher);
    source.setMatchers(matchers);
    sources.add(source);
  }
View Full Code Here

TOP

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

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.