Permalink
Browse files

Adding RightBooks.in based on request by Tanmoy Sarkar from that company

  • Loading branch information...
1 parent a87e512 commit ae3fa8e8e52019999db7ad83355c1ebdc3227159 @swaroopch committed Dec 17, 2011
Showing with 11 additions and 0 deletions.
  1. +11 −0 app/models/bookprice.rb
View
@@ -288,6 +288,17 @@ def search_cerramatter(isbn)
end
end
+ def search_rightbooks(isbn)
+ url = "http://www.rightbooks.in/Product_search.asp?cid=1&fc=5&fsr=#{isbn}&pt=2"
+ page = self.fetch_page(url)
+ unless page.nil?
+ text = page.search("span.footer_author1").text
+ { :price => find_price_at_end(text), :url => url }
+ else
+ { :price => NOT_AVAILABLE, :url => url }
+ end
+ end
+
end
end

0 comments on commit ae3fa8e

Please sign in to comment.