#!/usr/bin/env ruby require "rubygems" require "hpricot" require "net/http" require "net/https" require "open-uri" Hpricot.buffer_size = 262144 class HpricotBot class SiteTree attr :flags,:mother,:children,:url,:self_index def initialize end end attr :base_url,:follow_offsite,:max_depth def initialize(aHash) @base_url = aHash[:base_url] || "" @follow_offsite = aHash[:follow_offsite] || false @max_depth = aHash[:max_depth] || 4 @visit_once = aHash[:visit_once] || true end def visit_once @visit_once end def set_h_buffer(int=262144) Hpricot.buffer_size = int end def follow_offsite? @follow_offsite end end #doc = Hpricot(open(uri_base+page.to_s))