lib/scraper/comics.rb in ascraper-0.0.4 vs lib/scraper/comics.rb in ascraper-0.0.7
- old
+ new
@@ -18,15 +18,20 @@
result.main_image = main_image(comic)
result.other_images = other_images(comic)
result.download_link = download_link(comic)
result.tags = tags(comic)
+ result.description = description(comic)
results << result
end
end
results
+ end
+
+ def self.description(comic)
+ comic.at_css('.story_c').content.gsub(/\s+/, " ").strip
end
def self.main_image(comic)
comic.at_css('.story_c').search('img').map {|a| a['src']}.first
end
\ No newline at end of file