ExtractorJs

  • javascript 파일로 부터 uri를 추출하는 extractor

기본 설정 값

 <bean id="extractorJs" class="org.archive.modules.extractor.ExtractorJS">
 </bean> 


Posted by Righ
,

ExtractorCss

  • CSS type의 파일로 부터 uri를 파싱하는 extractor이다.

기존 설정 값

 <bean id="extractorCss" class="org.archive.modules.extractor.ExtractorCSS">
 </bean> 


Posted by Righ
,

ExtractorHtml

  • HTML content-body에서 기본적으로 링크를 추출하는 processor, 정규식을 사용하여 추출한다.

기존 설정 값

 <bean id="extractorHtml" class="org.archive.modules.extractor.ExtractorHTML">
  <!-- <property name="extractJavascript" value="true" /> -->
  <!-- <property name="extractValueAttributes" value="true" /> -->
  <!-- <property name="ignoreFormActionUrls" value="false" /> -->
  <!-- <property name="extractOnlyFormGets" value="true" /> -->
  <!-- <property name="treatFramesAsEmbedLinks" value="true" /> -->
  <!-- <property name="ignoreUnexpectedHtml" value="true" /> -->
  <!-- <property name="maxElementLength" value="1024" /> -->
  <!-- <property name="maxAttributeNameLength" value="1024" /> -->
  <!-- <property name="maxAttributeValueLength" value="16384" /> -->
 </bean>
  • [property에 대한 설명]
    1. extractJavascript : 페이지 안에 삽입된 javascript 문을 문자열로 스캔하여 모든 uri를 찾아낸다. <Heritrix 고도화를 위한 테스트 이력> test no 16,17 참조
    2. extractValueAttributes : 일반적이지 않은 곳에서 찾아진 uri와 비슷한 문자열 ( value 속성과 같은 ) 을 추출한다.
    3. ignoreFormActionUrls : action form에 나타난 uri들을 무시한다. <Heritrix 고도화를 위한 테스트 이력> test no 18 참조
    4. extractOnlyFormGets : get방식과 같은 action uri만 추출한다. <Heritrix 고도화를 위한 테스트 이력> test no 19 참조
    5. treatFramesAsEmbedLinks : FRAME/IFRAME SRC-link 들을 embed 링크처럼 취급한다. (img와 같은 E hop type) false의 경우는 L 링크로 취급 <Heritrix 고도화를 위한 테스트 이력> test no 20 참조
    6. ignoreUnexpectedHtml : .gif와 같이 html 확장자가 아닌 uri들을 html로 스캔하지 않는다.
    7. maxElementLength : element 길이를 설정한다. <Heritrix 고도화를 위한 테스트 이력> test no 21 참조
    8. maxAttributeNameLength : href, src와 같은 attribute name의 길이를 제한한다.
    9. maxAttrubuteValueLength : attr의 값의 길이를 제한한다.


Posted by Righ
,

ExtractorHttp

  • HTTP 응답 헤더에서 URI를 추출하는 프로세서

기존 설정 값

 <bean id="extractorHttp" class="org.archive.modules.extractor.ExtractorHTTP">
 </bean>
  • heritrix 3.1 부터는 이 모듈에서 자동으로 /favicon.ico를 모든 HTTP URI에 대해 탐색하도록 소스에 박아놓음.


Posted by Righ
,

FetchHttp

기존 설정 값

<bean id="fetchHttp" class="org.archive.modules.fetcher.FetchHTTP">
  <!-- <property name="useHTTP11" value="false" /> -->
  <!-- <property name="maxLengthBytes" value="0" /> -->
  <!-- <property name="timeoutSeconds" value="1200" /> -->
  <!-- <property name="maxFetchKBSec" value="0" /> -->
  <!-- <property name="defaultEncoding" value="ISO-8859-1" /> -->
  <!-- <property name="shouldFetchBodyRule"> 
        <bean class="org.archive.modules.deciderules.AcceptDecideRule"/>
       </property> -->
  <!-- <property name="soTimeoutMs" value="20000" /> -->
  <!-- <property name="sendIfModifiedSince" value="true" /> -->
  <!-- <property name="sendIfNoneMatch" value="true" /> -->
  <!-- <property name="sendConnectionClose" value="true" /> -->
  <!-- <property name="sendReferer" value="true" /> -->
  <!-- <property name="sendRange" value="false" /> -->
  <!-- <property name="ignoreCookies" value="false" /> -->
  <!-- <property name="sslTrustLevel" value="OPEN" /> -->
  <!-- <property name="acceptHeaders"> 
        <list>
         <value>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</value>
        </list>
       </property>
  -->
  <!-- <property name="httpBindAddress" value="" /> -->
  <!-- <property name="httpProxyHost" value="" /> -->
  <!-- <property name="httpProxyPort" value="0" /> -->
  <!-- <property name="httpProxyUser" value="" /> -->
  <!-- <property name="httpProxyPassword" value="" /> -->
  <!-- <property name="digestContent" value="true" /> -->
  <!-- <property name="digestAlgorithm" value="sha1" /> -->
 </bean>
  • [property에 대한 설명]
    1. useHTTP11 : HTTP/1.1 request 사용 여부
    2. maxLengthBytes : fecth할 최대 byte 수. 이 length 이후는 truncate 시킨다. 0은 제한없음을 가리킴
    3. timeoutSeconds : fetch가 해당 시간 안에 끝나지 않으면 포기 후 다음에 다시 시도함.
    4. maxFetchKBSec : 서버로 부터 데이터를 fetch하는 최대 속도.
    5. defaultEncoding : http 응답 헤더에 지정되어있지 않을 경우 사용할 encoding 방식
    6. shouldFetchBodyRule : http 응답 헤더는 받았지만 body는 다운로드 하기 전 상태에서, 이곳에서 설정된 rule에 따라 body fetch를 할것인지를 결정한다. filtering. robots.txt의 필터링과 비슷한 사전 작업.
      1. AcceptDecideRule : 모두 ACCEPT 함
      2. ContentTypeNotMatchesRegexDecideRule : content-type이 명시된 정규식에 매칭되는 것들을 제외하고 모두 ACCEPT/REJECT
        1. decision : ACCEPT/REJECT 여부
        2. regex : 정규식 지정
    7. soTimeoutMs : socket timeout 값 지정. 소켓이 해당 milliseconds 만큼 반응이 없으면 포기.
    8. sendIfModifiedSince : 'Last-Modified'정보가 fetch 되었다면 'If-Modified-Since' 헤더 값을 보낼지 말지 결정
    9. sendIfNoneMatch : 'Etag'정보가 fetch 되었다면 'If-None-Match' 헤더 값을 보낼지 말지 결정
    10. sendConnectionClose : 매 request 마다 'Connection: close' 헤더를 보냄
    11. sendReferer : 매 request 마다 'Referer' 헤더를 보냄. Referer는 crawler의 location 정보와 현재 URI가 어디서 발견되어 크롤링 되고 있는지에 대한 정보를 가지고 있다. 이는 주로 원격 서버에 log로 남는다.
    12. sendRange : 위 maxLengthBytes 값이 설정 된 경우 Range헤더에 이를 보낼지 말지 결정한다.
    13. ignoreCookies : cookie 핸들링을 하지 않을 경우 true.
    14. sslTrustLevel :
      1. OPEN : 만료, selfsign된 것들 등을 모두 신뢰함
      2. LOOSE : selfsign된 것을 포함해 모든 유효한 certificate를 신뢰함
      3. NORMAL : selfsign된 것을 제회한 모든 유효 certificate를 신뢰함
      4. STRICT : Cert가 유효하고 DN이 servername과 일치할 경우만 신뢰함
    15. acceptHeaders : 각각의 request에 포함시킬 Accept Header 지정. 'Accept-'로 시작하지 않는 헤더도 지정할 수 있다.
    16. httpBindAddress : connection시에 사용할 local IP address 혹은 hostname
    17. httpProxyHost : proxy host ip
    18. httpProxyPort : proxy port
    19. httpProxyUser : proxy user
    20. httpProxyPassword : proxy password
    21. digestConent : 회신 받은 content-body를 곧장 해싱할 것인지의 여부
    22. digestAlgorithm : 위 해싱할 알고리즘


Posted by Righ
,