Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Re-enabling uread.com

  • Loading branch information...
commit fb53f5a5d3bae531e074783982d822ec8e89b630 1 parent f72187c
Swaroop C H authored
Showing with 2 additions and 5 deletions.
  1. +0 −4 app/controllers/book_controller.rb
  2. +2 −1  app/models/bookprice.rb
4 app/controllers/book_controller.rb
View
@@ -22,10 +22,6 @@ def view
end
end
- if @stores.present?
- @stores = @stores.reject { |store, data| store == :uread } ## XXX HACK
- end
-
@bookinfo = Rails.cache.fetch("amazon_info:#{@isbn}", :expires_in => 1.day) { AmazonInfo::book_info(@isbn) }
if @bookinfo.nil?
@bookinfo = Rails.cache.fetch("flipkart_info:#{@isbn}", :expires_in => 1.day) { FlipkartInfo::book_info(@isbn) }
3  app/models/bookprice.rb
View
@@ -175,7 +175,8 @@ def search_bookadda(isbn)
end
def search_uread(isbn)
- url = "http://www.uread.com/search-books/#{isbn}/"
+ #url = "http://www.uread.com/search-books/#{isbn}/"
+ url = "http://www.uread.com/book/isbnnetin/#{isbn}/"
page = self.fetch_page(url)
unless page.nil?
text = page.search("p.our-price").text
Please sign in to comment.
Something went wrong with that request. Please try again.