SlideShare a Scribd company logo
1 of 14
6장 지능형 웹 크롤링

          김찬일
페이스북으로 색인 된 페이지
목차

• 6.1 웹 크롤링 개요
• 6.2 지능형 크롤러의 단계적 구현
• 6.3 너치를 사용한 대용량 크롤링
6.1 웹 크롤링 개요
6.1.1 왜 웹을 수집할까

•   컨텐츠 수집과 외부 컨텐츠 색인

•   특정 정보를 검색

•   이벤트 생성

•   깨진 링크

•   저작권 위반 검색
도식화 된 크롤링 프로세스 (p 197)
6.1.2 크롤링 프로세스


1.   시드 URL : 크롤링이 시작되는 사이트 목록

2.   크롤링 종료 조건 확인 : ex) 크롤링 한 페이지 개수, 수행 시간, 조건에 맞는 모든 URL 방문

3.   방문 할 다음 URL 획득 : robots.txt에 기록된 Disallow List를 참고하여 URL 큐에서
     Dequeue

4.   URL 컨텐츠 열기 : HTML을 파싱

5.   (Optional) 관련된 컨텐츠인지 확인 : 지능형 크롤러에 사용. 일반적인 크롤러의 경우 항상 참
     을 리턴

6.   컨텐츠 저장 : 관련된 컨텐츠라면 (필요한 부분을) 로컬에 저장

7.   URL 추출 : Parse된 HTML에서 방문한 적이 없는 URL을 큐에 저장

8.   의도적인 지연
6.1.3 지능형 크롤링과 집중 크롤링


•   배경 - 웹 전체를 크롤링 하려는 시도는 검색 엔진을 만들기 위한 색인 생성을 만드는 목적 이외에 무
    의미한 일이 될 수 있고, 비용 대비 효율이 좋지 않다. 따라서 특정 도메인이나 주제에 한정된 정보를
    모으는 방법이 필요해졌다.

•   근본 개념 - 관심 영역과 관련된 페이지일수록 그와 관련된 링크를 더 많이 가지고 있을 확률이 높다
    는 가정

•   구현 방법 - 앞에서 언급했던 관련된 컨텐츠인지 확인하는 단계에서 지금 받아온 페이지의 관심 영역
    과의 유사도를 계산하는 분류기라는 모델을 만들어, 큐에 링크 주소와 함께 앞에서 보았던 유사도 알
    고리즘을 사용하여 주제와의 유사도를 같이 넣고, 새로운 URL을 받아오는 단계에서 우선 순위가 가
    장 높은(유사도가 가장 높은 페이지에서 나온 URL)을 우선으로 하여 방문한다.

•   결과 - 크롤러의 효율성을 평가하는 데 일반적으로 사용되는 기준은 수집된 전체 컨텐츠 중 관심 주
    제와 관련된 컨텐츠의 비율인 수집 효율인데, 관심 영역과 관련된 페이지가 링크하는 주소는 그와 관
    련된 내용을 가지고 있을 확률이 높다는 점에서 수집 효율을 높일 수 있다.




•   유의사항 - 시드 URL로 경험에 의해 관심 영역에 가장 부합하는 페이지를 넣음으로써 수집 효율을
    높일 수 있다.
6.1.4 딥 크롤링


•   딥 크롤링은 페이지의 링크를 따라서는 갈 수 없는 페이지를 의미하는 데, 주로 AJAX를 사용하는 사
    이트처럼 크롤러가 사이트를 자유롭게 돌아다닐 수 없을 때 주로 사이트맵 프로토콜을 이용하여 크
    롤링 하는 방법이다.

•   사이트맵은 웹 크롤러가 수집할 수 있는 URL을 알려주는 XML 문서이다.




•   사이트맵 활용을 통해 검색 엔진 최적화를 하여 웹 페이지가 구글 검색 엔진의 상위에 위치할 수 있
    다.
1.continueCrawling(): 크롤링 종료 조건 확인한다.
2.getNextUrl(): 다음에 방문할 URL을 받는다.
3.getContent(url): URL의 컨텐츠를 확인한다.
4.isContentRelevant(content, this.regexpSearchPattern): 다운 받은 컨텐츠가 관
심있는 컨텐츠인지 확인한다.
5.saveContent(content, url): 컨텐츠를 저장한다.
6.extractURL(content, url): 컨텐츠를 파싱해서 URL을 추출한다.
7.addUrlsToUrlQueue(url, urlStrings): 추출된 URL을 큐에 넣는다.
8.Thread.sleep(this.delayBetweenUrls): 지연
# Notice: if you would like to crawl   User-agent: naverbot             Disallow:   /p.php
     Facebook you can                       Disallow: /ac.php                Disallow:   /photo.php
# contact us here: http://                  Disallow: /ae.php                Disallow:   /photo_comments.php
www.facebook.com/apps/                      Disallow: /album.php             Disallow:   /photo_search.php
site_scraping_tos.php                       Disallow: /ap.php                Disallow:   /photos.php
# to apply for white listing. Our general   Disallow: /autologin.php
terms are available                         Disallow: /checkpoint/           User-agent: Yandex
# at http://www.facebook.com/apps/          Disallow: /feeds/                Disallow: /ac.php
site_scraping_tos_terms.php                 Disallow: /l.php                 Disallow: /ae.php
                                            Disallow: /o.php                 Disallow: /album.php
User-agent: baiduspider                     Disallow: /p.php                 Disallow: /ap.php
Disallow: /ac.php                           Disallow: /photo.php             Disallow: /autologin.php
Disallow: /ae.php                           Disallow: /photo_comments.php    Disallow: /checkpoint/
Disallow: /album.php                        Disallow: /photo_search.php      Disallow: /feeds/
Disallow: /ap.php                           Disallow: /photos.php            Disallow: /l.php
Disallow: /autologin.php                                                     Disallow: /o.php
Disallow: /checkpoint/                      User-agent: seznambot            Disallow: /p.php
Disallow: /feeds/                           Disallow: /ac.php                Disallow: /photo.php
Disallow: /l.php                            Disallow: /ae.php                Disallow: /photo_comments.php
Disallow: /o.php                            Disallow: /album.php             Disallow: /photo_search.php
Disallow: /p.php                            Disallow: /ap.php                Disallow: /photos.php
Disallow: /photo.php                        Disallow: /autologin.php
Disallow: /photo_comments.php               Disallow: /checkpoint/           User-agent: *
Disallow: /photo_search.php                 Disallow: /feeds/                Disallow: /
Disallow: /photos.php                       Disallow: /l.php
                                            Disallow: /o.php                 # E-mail sitemaps@lists.facebook.com if
User-agent: Googlebot                       Disallow: /p.php                 you are authorized to access these and are
Disallow: /ac.php                           Disallow: /photo.php             getting denied.
Disallow: /ae.php                           Disallow: /photo_comments.php    Sitemap: http://www.facebook.com/
Disallow: /album.php                        Disallow: /photo_search.php      sitemap.php
Disallow: /ap.php                           Disallow: /photos.php
Disallow: /autologin.php
Disallow: /checkpoint/                      User-agent: Slurp
Disallow: /feeds/                           Disallow: /ac.php
Disallow: /l.php                            Disallow: /ae.php
Disallow: /o.php                            Disallow: /album.php
Disallow: /p.php                            Disallow: /ap.php
Disallow: /photo.php                        Disallow: /autologin.php
Disallow: /photo_comments.php               Disallow: /checkpoint/
Disallow: /photo_search.php                 Disallow: /feeds/
Disallow: /photos.php                       Disallow: /l.php


                                                                            Facebook.com/
                                            Disallow: /o.php
User-agent: msnbot                          Disallow: /p.php
Disallow: /ac.php                           Disallow: /photo.php
Disallow: /ae.php                           Disallow: /photo_comments.php
Disallow: /album.php
Disallow: /ap.php
Disallow: /autologin.php
Disallow: /checkpoint/
                                            Disallow: /photo_search.php
                                            Disallow: /photos.php

                                            User-agent: teoma
                                                                              robots.txt
Disallow: /feeds/                           Disallow: /ac.php
Disallow: /l.php                            Disallow: /ae.php
Disallow: /o.php                            Disallow: /album.php
Disallow: /p.php                            Disallow: /ap.php
Disallow: /photo.php                        Disallow: /autologin.php
Disallow: /photo_comments.php               Disallow: /checkpoint/
Disallow: /photo_search.php                 Disallow: /feeds/
Disallow: /photos.php                       Disallow: /l.php
                                            Disallow: /o.php
URL 추출


•   하이퍼 링크 URL은 두 종류이다.

     •   절대 경로 URL - /<a hrefs*=s*”http://(.)*”/ 의 regexp로 코드 상에서 절대 경로
         URL 추출할 수 있다. 즉, <a href = “http://somethig.com/robots.txt” ... 에서
         somethig.com/robots.txt를 추출한다.

     •   상대 경로 URL - /<a hrefs*=s*”(.)*”/ 의 regexp로 코드 상에서 상대 경로 URL을 추
         출할 수 있다. 이 경우 현재 URL과 상대 경로 URL을 더하는 방법으로 절대 경로 URL을 구할
         수 있다.
결론


•   웹 크롤러는 문서에 있는 하이퍼링크를 따라가는 과정을 통해 사이트 컨텐츠를 수집하는 프로
    그램이다. 하지만 전체 웹을 크롤링 하려면 장비와 저장 장치 그리고 고속 네트워크 등 비용이
    너무 크고, 전체 컨텐츠에 비해 필요한 정보가 너무 적게 되는 문제가 있다. 따라서 지능형 크
    롤러를 활용하여 크롤링 URL중 우선 순위가 더 높은 페이지를 먼저 크롤링하여 관심있는 정
    보를 수집하는 데 도움이 될 수 있다.
사용 가능한 크롤러




•   너치 - 대용량 크롤러 자바 기반

•   Mechanize - 루비 기반의 간단한 크롤러

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

6장 지능형 웹 크롤링

  • 1. 6장 지능형 웹 크롤링 김찬일
  • 3. 목차 • 6.1 웹 크롤링 개요 • 6.2 지능형 크롤러의 단계적 구현 • 6.3 너치를 사용한 대용량 크롤링
  • 4. 6.1 웹 크롤링 개요 6.1.1 왜 웹을 수집할까 • 컨텐츠 수집과 외부 컨텐츠 색인 • 특정 정보를 검색 • 이벤트 생성 • 깨진 링크 • 저작권 위반 검색
  • 5. 도식화 된 크롤링 프로세스 (p 197)
  • 6. 6.1.2 크롤링 프로세스 1. 시드 URL : 크롤링이 시작되는 사이트 목록 2. 크롤링 종료 조건 확인 : ex) 크롤링 한 페이지 개수, 수행 시간, 조건에 맞는 모든 URL 방문 3. 방문 할 다음 URL 획득 : robots.txt에 기록된 Disallow List를 참고하여 URL 큐에서 Dequeue 4. URL 컨텐츠 열기 : HTML을 파싱 5. (Optional) 관련된 컨텐츠인지 확인 : 지능형 크롤러에 사용. 일반적인 크롤러의 경우 항상 참 을 리턴 6. 컨텐츠 저장 : 관련된 컨텐츠라면 (필요한 부분을) 로컬에 저장 7. URL 추출 : Parse된 HTML에서 방문한 적이 없는 URL을 큐에 저장 8. 의도적인 지연
  • 7. 6.1.3 지능형 크롤링과 집중 크롤링 • 배경 - 웹 전체를 크롤링 하려는 시도는 검색 엔진을 만들기 위한 색인 생성을 만드는 목적 이외에 무 의미한 일이 될 수 있고, 비용 대비 효율이 좋지 않다. 따라서 특정 도메인이나 주제에 한정된 정보를 모으는 방법이 필요해졌다. • 근본 개념 - 관심 영역과 관련된 페이지일수록 그와 관련된 링크를 더 많이 가지고 있을 확률이 높다 는 가정 • 구현 방법 - 앞에서 언급했던 관련된 컨텐츠인지 확인하는 단계에서 지금 받아온 페이지의 관심 영역 과의 유사도를 계산하는 분류기라는 모델을 만들어, 큐에 링크 주소와 함께 앞에서 보았던 유사도 알 고리즘을 사용하여 주제와의 유사도를 같이 넣고, 새로운 URL을 받아오는 단계에서 우선 순위가 가 장 높은(유사도가 가장 높은 페이지에서 나온 URL)을 우선으로 하여 방문한다. • 결과 - 크롤러의 효율성을 평가하는 데 일반적으로 사용되는 기준은 수집된 전체 컨텐츠 중 관심 주 제와 관련된 컨텐츠의 비율인 수집 효율인데, 관심 영역과 관련된 페이지가 링크하는 주소는 그와 관 련된 내용을 가지고 있을 확률이 높다는 점에서 수집 효율을 높일 수 있다. • 유의사항 - 시드 URL로 경험에 의해 관심 영역에 가장 부합하는 페이지를 넣음으로써 수집 효율을 높일 수 있다.
  • 8. 6.1.4 딥 크롤링 • 딥 크롤링은 페이지의 링크를 따라서는 갈 수 없는 페이지를 의미하는 데, 주로 AJAX를 사용하는 사 이트처럼 크롤러가 사이트를 자유롭게 돌아다닐 수 없을 때 주로 사이트맵 프로토콜을 이용하여 크 롤링 하는 방법이다. • 사이트맵은 웹 크롤러가 수집할 수 있는 URL을 알려주는 XML 문서이다. • 사이트맵 활용을 통해 검색 엔진 최적화를 하여 웹 페이지가 구글 검색 엔진의 상위에 위치할 수 있 다.
  • 9. 1.continueCrawling(): 크롤링 종료 조건 확인한다. 2.getNextUrl(): 다음에 방문할 URL을 받는다. 3.getContent(url): URL의 컨텐츠를 확인한다. 4.isContentRelevant(content, this.regexpSearchPattern): 다운 받은 컨텐츠가 관 심있는 컨텐츠인지 확인한다. 5.saveContent(content, url): 컨텐츠를 저장한다. 6.extractURL(content, url): 컨텐츠를 파싱해서 URL을 추출한다. 7.addUrlsToUrlQueue(url, urlStrings): 추출된 URL을 큐에 넣는다. 8.Thread.sleep(this.delayBetweenUrls): 지연
  • 10.
  • 11. # Notice: if you would like to crawl User-agent: naverbot Disallow: /p.php Facebook you can Disallow: /ac.php Disallow: /photo.php # contact us here: http:// Disallow: /ae.php Disallow: /photo_comments.php www.facebook.com/apps/ Disallow: /album.php Disallow: /photo_search.php site_scraping_tos.php Disallow: /ap.php Disallow: /photos.php # to apply for white listing. Our general Disallow: /autologin.php terms are available Disallow: /checkpoint/ User-agent: Yandex # at http://www.facebook.com/apps/ Disallow: /feeds/ Disallow: /ac.php site_scraping_tos_terms.php Disallow: /l.php Disallow: /ae.php Disallow: /o.php Disallow: /album.php User-agent: baiduspider Disallow: /p.php Disallow: /ap.php Disallow: /ac.php Disallow: /photo.php Disallow: /autologin.php Disallow: /ae.php Disallow: /photo_comments.php Disallow: /checkpoint/ Disallow: /album.php Disallow: /photo_search.php Disallow: /feeds/ Disallow: /ap.php Disallow: /photos.php Disallow: /l.php Disallow: /autologin.php Disallow: /o.php Disallow: /checkpoint/ User-agent: seznambot Disallow: /p.php Disallow: /feeds/ Disallow: /ac.php Disallow: /photo.php Disallow: /l.php Disallow: /ae.php Disallow: /photo_comments.php Disallow: /o.php Disallow: /album.php Disallow: /photo_search.php Disallow: /p.php Disallow: /ap.php Disallow: /photos.php Disallow: /photo.php Disallow: /autologin.php Disallow: /photo_comments.php Disallow: /checkpoint/ User-agent: * Disallow: /photo_search.php Disallow: /feeds/ Disallow: / Disallow: /photos.php Disallow: /l.php Disallow: /o.php # E-mail sitemaps@lists.facebook.com if User-agent: Googlebot Disallow: /p.php you are authorized to access these and are Disallow: /ac.php Disallow: /photo.php getting denied. Disallow: /ae.php Disallow: /photo_comments.php Sitemap: http://www.facebook.com/ Disallow: /album.php Disallow: /photo_search.php sitemap.php Disallow: /ap.php Disallow: /photos.php Disallow: /autologin.php Disallow: /checkpoint/ User-agent: Slurp Disallow: /feeds/ Disallow: /ac.php Disallow: /l.php Disallow: /ae.php Disallow: /o.php Disallow: /album.php Disallow: /p.php Disallow: /ap.php Disallow: /photo.php Disallow: /autologin.php Disallow: /photo_comments.php Disallow: /checkpoint/ Disallow: /photo_search.php Disallow: /feeds/ Disallow: /photos.php Disallow: /l.php Facebook.com/ Disallow: /o.php User-agent: msnbot Disallow: /p.php Disallow: /ac.php Disallow: /photo.php Disallow: /ae.php Disallow: /photo_comments.php Disallow: /album.php Disallow: /ap.php Disallow: /autologin.php Disallow: /checkpoint/ Disallow: /photo_search.php Disallow: /photos.php User-agent: teoma robots.txt Disallow: /feeds/ Disallow: /ac.php Disallow: /l.php Disallow: /ae.php Disallow: /o.php Disallow: /album.php Disallow: /p.php Disallow: /ap.php Disallow: /photo.php Disallow: /autologin.php Disallow: /photo_comments.php Disallow: /checkpoint/ Disallow: /photo_search.php Disallow: /feeds/ Disallow: /photos.php Disallow: /l.php Disallow: /o.php
  • 12. URL 추출 • 하이퍼 링크 URL은 두 종류이다. • 절대 경로 URL - /<a hrefs*=s*”http://(.)*”/ 의 regexp로 코드 상에서 절대 경로 URL 추출할 수 있다. 즉, <a href = “http://somethig.com/robots.txt” ... 에서 somethig.com/robots.txt를 추출한다. • 상대 경로 URL - /<a hrefs*=s*”(.)*”/ 의 regexp로 코드 상에서 상대 경로 URL을 추 출할 수 있다. 이 경우 현재 URL과 상대 경로 URL을 더하는 방법으로 절대 경로 URL을 구할 수 있다.
  • 13. 결론 • 웹 크롤러는 문서에 있는 하이퍼링크를 따라가는 과정을 통해 사이트 컨텐츠를 수집하는 프로 그램이다. 하지만 전체 웹을 크롤링 하려면 장비와 저장 장치 그리고 고속 네트워크 등 비용이 너무 크고, 전체 컨텐츠에 비해 필요한 정보가 너무 적게 되는 문제가 있다. 따라서 지능형 크 롤러를 활용하여 크롤링 URL중 우선 순위가 더 높은 페이지를 먼저 크롤링하여 관심있는 정 보를 수집하는 데 도움이 될 수 있다.
  • 14. 사용 가능한 크롤러 • 너치 - 대용량 크롤러 자바 기반 • Mechanize - 루비 기반의 간단한 크롤러

Editor's Notes

  1. \n
  2. 120&amp;#xC5B5;&amp;#xAC1C;&amp;#xC758; &amp;#xD398;&amp;#xC774;&amp;#xC9C0;\n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. &amp;#xC774;&amp;#xB7EC;&amp;#xD55C; robots.txt&amp;#xB97C; parsing&amp;#xD574;&amp;#xC11C; block&amp;#xB41C; &amp;#xD398;&amp;#xC774;&amp;#xC9C0;&amp;#xB97C; &amp;#xBBF8;&amp;#xB9AC; &amp;#xB9CC;&amp;#xB4DC;&amp;#xB294; &amp;#xBC29;&amp;#xBC95;&amp;#xC744; &amp;#xD1B5;&amp;#xD574; &amp;#xBD88;&amp;#xD544;&amp;#xC694;&amp;#xD55C; &amp;#xD398;&amp;#xC774;&amp;#xC9C0;&amp;#xB97C; &amp;#xBC29;&amp;#xBB38;&amp;#xD558;&amp;#xB294; &amp;#xC811;&amp;#xADFC;&amp;#xC744; &amp;#xC904;&amp;#xC77C; &amp;#xC218; &amp;#xC788;&amp;#xB2E4;.\n
  12. \n
  13. \n
  14. \n