Project

crawler

0.01
No commit activity in last 3 years
No release in over 3 years
BFS webcrawler that implements Observable
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Crawler¶ ↑

Crawler consists of two classes, Crawler::Webcrawler and Crawler::Observer. All actual crawling is contained in Webcrawler, so Observer can be replaced with any class that implements the update method (See the Observable module for more).

Webcrawler¶ ↑

The Webcrawler class can be instantiated with a hash of options, all of which are documented in the rdoc.

Please note:¶ ↑

As of right now Webcrawler *does not* respect robots.txt. This is planned for a future release, but until then please do not use this on a website which you don’t own or have permission to crawl. I further encourage you to read the section of the license about this being “AS IS” software for which I make no warranty and accept no liability. Play nice out there!

Observer¶ ↑

The Observer class may be instantiated with an object for logging, as long as it responds to the puts method. It is applied by passing an instance of it to the add_observer method of a Crawler object. Any class may be substitute (or supplement) which implements the update method with two arguments, an instance of HTTPResponse and an instance of URI.

Installation¶ ↑

gem install crawler

It’s just that easy!

Executable¶ ↑

The gem comes with an executable version you may find useful:

crawler url [-txl] -t –timeout, Timeout limit in seconds -x –exclude, Comma separated list of strings which will be passed to the exclude option of Crawler -l –log, A filename for a log file, defaults to STDOUT

License¶ ↑

This gem is licensed under the MIT/X11 license. A copy is included in the file LICENSE.