Class: TellyReviews::Scraper
- Inherits:
-
Object
- Object
- TellyReviews::Scraper
- Defined in:
- lib/telly_reviews/scraper.rb
Class Method Summary collapse
Class Method Details
.make_list ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/telly_reviews/scraper.rb', line 3 def self.make_list Nokogiri::HTML(open("http://variety.com/v/tv/reviews/")).css(".module-blogroll-section-front .story").each do |review| TellyReviews::Review.new({ title: review.css("h2").text.strip, author: review.css(".author a").text.strip, url: review.css("a").attr('href').value }) end end |