No commit activity in last 3 years
No release in over 3 years
A non-threaded spider bot that spiders a site with response time stats. easily extendable
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Spider bot¶ ↑



a non-threaded spider bot that spiders a site with response time stats. easily extendable

Installation¶ ↑

sudo gem install ssoroka-spider_bot

Usage ¶ ↑



Usable in code or from terminal:

$ spider_bot http://www.example.com
$ spider_bot http://0.0.0.0:3000

Code example of a custom spider script in script/spider:

#!/usr/bin/env ruby
require 'rubygems'
require 'spider_bot'

class MySpider < SpiderBot
  # override these for handling events
  def on_page(page)
  end

  def on_404(link)
  end

  def on_500(link)
  end

  # override these for changing how urls are classified as links
  def off_site?(url)
    url !~ /^\// # urls not starting with a /
  end

  def ignorable?(url)
    url =~ /\/.*\..+/ && # files with extensions
      url !~ /\.html$/ # but not html files
  end
end

spider = MySpider.new(:quiet => false)
spider.start(ARGV[1])

Gem Requirements¶ ↑

  • ssoroka-ansi

  • mechanize