Class: BookClubPicks::Scraper
- Inherits:
-
Object
- Object
- BookClubPicks::Scraper
- Defined in:
- lib/book_club_picks/scraper.rb
Class Method Summary collapse
Class Method Details
.scrape_book_movement ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/book_club_picks/scraper.rb', line 11 def self.scrape_book_movement doc = Nokogiri::HTML(open("http://www.bookmovement.com/topClubPicks")) current_books = [] doc.search("div.midd").each do |book| current_books << book.search("h2").text end current_books.each_with_index do |book, index| puts "#{index+1}. #{book}" end end |
.scrape_books ⇒ Object
7 8 9 |
# File 'lib/book_club_picks/scraper.rb', line 7 def self.scrape_books self.scrape_book_movement end |
.today ⇒ Object
3 4 5 |
# File 'lib/book_club_picks/scraper.rb', line 3 def self.today self.scrape_books end |