Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crawler

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crawler

  • 0.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= 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:

  • timeout -- Time limit for the crawl operation, after which a Timeout::Error exception is raised.
  • external -- Boolean; whether or not the crawler will go outside the original URI's host.
  • exclude -- A URI will be excluded if it includes any of the strings within this array.

=== 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.

FAQs

Package last updated on 26 Jan 2010

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc