Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updating Indiaplaza URL which works with affiliate ID

  • Loading branch information...
commit 9e87450c7b04dc7bd9eef163e353bba2abeab214 1 parent 363d702
@swaroopch authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.