212.Heritrix_설정파일/04. SCOPE

[Heritrix/crawler-beans.cxml]acceptSurts

Righ 2016. 7. 26. 13:51

AcceptSurts

  • Scope에서 참조하는 Bean이다. 이 Bean에서 설정해준 surt rule을 따르는 URL은 크롤링한다. 크롤링 규칙을 Surt Rule로 설정해 주고 싶을 때 이 Bean을 사용한다.

기존 설정 값

 <bean id="acceptSurts" class="org.archive.modules.deciderules.surt.SurtPrefixedDecideRule">
  <!-- <property name="decision" value="ACCEPT"/> -->
  <!-- <property name="seedsAsSurtPrefixes" value="true" /> -->
  <!-- <property name="alsoCheckVia" value="false" /> -->
  <!-- <property name="surtsSourceFile" value="" /> -->
  <!-- <property name="surtsDumpFile" value="${launchId}/surts.dump" /> -->
  <!-- <property name="surtsSource">
        <bean class="org.archive.spring.ConfigString">
         <property name="value">
          <value>
           # example.com
           # http://www.example.edu/path1/
           # +http://(org,example,
          </value>
         </property> 
        </bean>
       </property> -->
 </bean>
  • [property에 대한 설명]
    1. decision : 아래의 설정 룰에 매칭되는 url을 Accept할 것인지 혹은 Reject 할 것 인지 여부
    2. seedsAsSurtPrefixes : 위에서 seed로 설정 해준 url을 Surt prefix rule로 설정할 것인지에 대한 여부. Heritrix 고도화를 위한 테스트 이력 no 3. 참조
    3. alsoCheckVia : Via 링크가 Surt규칙에 매칭될 경우에도 Accept할 것인지에 대한 여부. 만약 example.com 사이트를 크롤링할 때 example.com/a.html에 외부로 향하는 링크가 있다고 한다면, example.com/a.html이 Surt 규칙에 부합하므로 이 외부 링크를 ACCEPT하고 로그에 남김과 동시에 큐에 Push한다. Heritrix 고도화를 위한 테스트 이력 no 4. 및 acceptSurts_alsoCheckVia 테스트 로그 분석 참조
    4. surtsSourceFile : 여기에 파일 경로를 적어줄 경우 surt 규칙들을 파일로 관리할 수 있다.
    5. 그 아래 주석 처리 된 부분은 모두 Surt 규칙을 파일로 또는, 직접 설정해 주는 부분임