Skip to content
Browse files

Fixing Rediff prices, thanks to report by Sashank Dara

  • Loading branch information...
1 parent 71e631e commit df95014b9189500d4018a9b0a62e7f34f4e77b7e @swaroopch committed Jul 29, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/bookprice.rb
View
2 app/models/bookprice.rb
@@ -112,7 +112,7 @@ def search_rediff(isbn)
url = "http://books.rediff.com/book/ISBN:#{isbn}"
page = self.fetch_page(url)
unless page.nil?
- text = page.search("font#book-pric/b").text
+ text = page.search("font#book-pric b").try(:first).try(:text) or ""
{ :price => find_price_at_end(text), :url => url }
else
{ :price => NOT_AVAILABLE, :url => url }

0 comments on commit df95014

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