lib/coming_soon/movie.rb in coming_soon-0.2.4 vs lib/coming_soon/movie.rb in coming_soon-0.2.5

- old
+ new

@@ -19,11 +19,11 @@ movie_list = doc.css("li.visual-item") @movies = [] count = 1 - movie_list.each do |movie| + movie_list.each do |movie| @soon = self.new @soon.name = movie.css("a.visual-title").text.strip @soon.start_date = movie.css("span").text @soon.url = movie.css("a").attribute("href").value @@ -53,10 +53,11 @@ @doc_synop1.css("span#SynopsisTextLabel").any? # If not a redirect failure and a READ FULL SYNOPSIS link is not # present and any text is available, use the text for the synopsis @soon.synopsis = @doc_synop1.css("span#SynopsisTextLabel").text else - # scrape the synopsis using the HTTP 'plotsummary' url + # Scrape the synopsis using the HTTP 'plotsummary' url + # This is also executed after an HTTP to HTTPS redirect failed synop_url = @soon.url.sub(/movieoverview/, 'plotsummary') doc_synop2 = Nokogiri::HTML(open(synop_url)) @soon.synopsis = doc_synop2.css("p.subpage-descriptive-content").text end