Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit dbcc3ba8d60441934a96fcf42c8e3b29272790eb 1 parent df95014
@swaroopch authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  app/models/bookprice.rb
View
2  app/models/bookprice.rb
@@ -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 }
Please sign in to comment.
Something went wrong with that request. Please try again.