Browse files

Updating Indiaplaza URL which works with affiliate ID

  • Loading branch information...
1 parent 363d702 commit 9e87450c7b04dc7bd9eef163e353bba2abeab214 @swaroopch committed Nov 10, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/bookprice.rb
View
4 app/models/bookprice.rb
@@ -123,11 +123,11 @@ def search_rediff(isbn)
end
def search_indiaplaza(isbn)
- url = "http://www.indiaplaza.com/books/#{isbn}.htm?affId=110550"
+ url = "http://www.indiaplaza.com/search.aspx?storename=Books&srchkey=isbn&srchVal=#{isbn}?affid=110550"
page = self.fetch_page(url)
unless page.nil?
begin
- text = page.search("div#content li:first-child")[0].children[1].text
+ text = page.search(".tier1box2 ul li:first-child span").text
rescue
text = nil
end

0 comments on commit 9e87450

Please sign in to comment.