Method: ESearchy::SearchEngines::Yahoo#parse
- Defined in:
- lib/esearchy/SearchEngines/yahoo.rb
#parse(json) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/esearchy/SearchEngines/yahoo.rb', line 20 def parse(json) doc = JSON.parse(json) hits = doc["ysearchresponse"]["totalhits"].to_i if hits == nil or hits == 0 @totalhits = 0 else @totalhits = totalhits(hits) end super doc["ysearchresponse"]["resultset_web"] end |