Permalink
Browse files

Adding cerramatter.com

  • Loading branch information...
1 parent 62451bf commit b73ebe51d6c826ee55b26404637a8c51b7b4221e @swaroopch committed Aug 3, 2011
Showing with 12 additions and 0 deletions.
  1. +12 −0 app/models/bookprice.rb
View
@@ -271,6 +271,18 @@ def search_kindle(isbn)
{ :price => NOT_AVAILABLE, :url => url }
end
end
+
+ def search_cerramatter(isbn)
+ url = "http://www.cerramatter.com/Search.html?keyword1=#{isbn}"
+ page = self.fetch_page(url)
+ unless page.nil?
+ text = page.search(".productPrice").text
+ { :price => find_price_at_end(text), :url => url }
+ else
+ { :price => NOT_AVAILABLE, :url => url }
+ end
+ end
+
end
end

0 comments on commit b73ebe5

Please sign in to comment.