Scraping vs. Crawling

Published by onesixx on

https://rstudio-pubs-static.s3.amazonaws.com/288283_5e931dbca8ba4e72a43832cc5738b06c.html

주요 차이점

ScrapingCrawling
페이지중 특정 데이터만
extracting
모든 페이지를
visiting
소량 output
(targeted output)
대량 output

Scraping

원하는 정보만을 추출하는 기술 (web Scraping은 웹사이트에서 정보추출)
일반적인 scraping은 FTP(SFTP), API response (SOAP, JSON), HTML일 것이다.
정보제공자에 따라 다른 형태로 제공될 수 있고, 원하는 정보는 찾아서 가져오는 것이라 할수 있다.

Crawling

자동화봇가 일정 규칙으로 웹페이지를 브라우징 하는 것 (web Crawling은 웹크롤러(자동화봇)가 웹페이지에서 브라우징)
Crawling은 오히려 검색엔진이 하는 일과 비슷하다.
원하는 정보를 Scrapping할 수 있도록, 여러사이트를 돌아다니면서 정보를 탐색한다.

따라서 robots exclusion standard(robots.txt)도 잘 따라야 침입자로 오해받지 않는다.
Crawling이 Web Server 한테는 response보다 빠르게 데이터를 request하기때문에 공격적인 행위로 간주되어,
IP차단을 당하거나 일시적으로 접근을 거부달할수 있다. 그래서 항상 robots의 protocol을 따르며 조심해야한다.

R 패키지 for Scraping , Crawling

RCrawler: An R package for parallel web crawling and scraping(PDF):
https://www.sciencedirect.com/science/article/pii/S2352711017300110

scraping:

Package NameCrawlRetrieveParseDescription
RvestNoYesYesWraps around the xml2 and httr packages so that they can easily to download and then manipulate HTML and XML.
scrapeRNoYesYesFrom a given vector of URLs, retrieves web pages and parses them to pull out information of interest using an XPath pattern.
tm.plugin.webminingNoYesYesFollows links on web feed formats like XML and JSON, and extracts contents using boilerpipe method.

crawling

Package NameCrawlRetrieveParseDescription
RCrawler YesYesYesCrawls web sites and extracts their content using various techniques.

Some basic web toolkits:

Package NameCrawlRetrieveParseDescription
XML, XML2NoNoYesHTML / XML parsers
jsonlite, RJSONIONoNoYesJSON parser
RSeleniumNoNoYesBrowser Automation
SelectrNoNoYesParses CSS3 Selectors and translates them to XPath 1.0
Httr, RCurlNoYesNoHandles HTTP / HTTPS requests
Categories: quant

onesixx

Blog Owner

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x