Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Adding cerramatter.com

  • Loading branch information...
commit b73ebe51d6c826ee55b26404637a8c51b7b4221e 1 parent 62451bf
Swaroop C H authored

Showing 1 changed file with 12 additions and 0 deletions. Show diff stats Hide diff stats

  1. +12 0 app/models/bookprice.rb
12 app/models/bookprice.rb
@@ -271,6 +271,18 @@ def search_kindle(isbn)
271 271 { :price => NOT_AVAILABLE, :url => url }
272 272 end
273 273 end
  274 +
  275 + def search_cerramatter(isbn)
  276 + url = "http://www.cerramatter.com/Search.html?keyword1=#{isbn}"
  277 + page = self.fetch_page(url)
  278 + unless page.nil?
  279 + text = page.search(".productPrice").text
  280 + { :price => find_price_at_end(text), :url => url }
  281 + else
  282 + { :price => NOT_AVAILABLE, :url => url }
  283 + end
  284 + end
  285 +
274 286 end
275 287
276 288 end

0 comments on commit b73ebe5

Please sign in to comment.
Something went wrong with that request. Please try again.