Permalink
Browse files

Fixing tradus.in parsing, thanks to report by Manu J

  • Loading branch information...
1 parent df95014 commit dbcc3ba8d60441934a96fcf42c8e3b29272790eb @swaroopch committed Jul 29, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/bookprice.rb
View
@@ -190,7 +190,7 @@ def search_tradus(isbn)
url = "http://www.tradus.in/search/tradus_search/#{isbn}"
page = self.fetch_page(url)
unless page.nil?
- text = page.search("div.search_price_col label").text
+ text = page.search("div.productPrice").try(:first).try(:text) or ""
{ :price => find_price_at_end(text), :url => url }
else
{ :price => NOT_AVAILABLE, :url => url }

0 comments on commit dbcc3ba

Please sign in to comment.