Class: ESearchy::OtherEngines::Usenet

Inherits:
GenericEngine show all
Defined in:
lib/esearchy/OtherEngines/usenet.rb

Constant Summary collapse

ENGINE =
"usenet-addresses.mit.edu"
PORT =
80
NUM =

Do not really ned it :)

0
TYPE =
1

Instance Attribute Summary

Attributes inherited from GenericEngine

#documents, #emails, #people, #results

Instance Method Summary collapse

Methods inherited from GenericEngine

#company=, #initialize, #maxhits=, #start=

Constructor Details

This class inherits a constructor from ESearchy::GenericEngine

Instance Method Details

#parse(html) ⇒ Object



17
18
19
# File 'lib/esearchy/OtherEngines/usenet.rb', line 17

def parse( html )
  super html.scan(/href=["|']([0-9A-Za-z:\\\/?&=@+%.;"'()_-]+)["|']/)
end

#searchObject



9
10
11
12
13
14
15
# File 'lib/esearchy/OtherEngines/usenet.rb', line 9

def search
  @querypath = "/cgi-bin/udb?T=" + @query + "&G=&S=&N=&O=&M=500"
  get ENGINE, PORT, @querypath, {'User-Agent' => UserAgent::fetch } do |r|
    D "Searching #{self.class}"
    crawler(r.body)
  end
end