Class: ESearchy::OtherEngines::GoogleGroups
- Inherits:
-
GenericEngine
- Object
- GenericEngine
- ESearchy::OtherEngines::GoogleGroups
- Defined in:
- lib/esearchy/OtherEngines/googlegroups.rb
Constant Summary collapse
- ENGINE =
"groups.google.com"
- PORT =
80
- NUM =
100
- 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
14 15 16 17 18 19 20 21 22 |
# File 'lib/esearchy/OtherEngines/googlegroups.rb', line 14 def parse( html ) hits = html.scan(/<\/b> of about <b>(.*)<\/b> for /) if hits.empty? or hits == nil @totalhits = 0 else @totalhits = totalhits(hits[0][0].gsub(",","").to_i) end super html.scan(/<div class=g align="left"><a href="([0-9A-Za-z:\\\/?&=@+%.;"'()_-]+)" target=""/) end |
#search ⇒ Object
9 10 11 12 |
# File 'lib/esearchy/OtherEngines/googlegroups.rb', line 9 def search @querypath = "/groups/search?&safe=off&num=100&q=" + @query + "&btnG=Search&start=" super end |