lib/image_scraper/client.rb in image_scraper-0.1.7 vs lib/image_scraper/client.rb in image_scraper-0.1.8

- old
+ new

@@ -31,11 +31,11 @@ end def stylesheet_images images = [] stylesheets.each do |stylesheet| - file = open(stylesheet) - css = file.string rescue IO.read(file) + file = open(stylesheet) rescue next + css = file.string rescue IO.read(file) rescue next images += css.scan(/url\((.*?)\)/).collect do |image_url| image_url = URI.escape image_url[0] if image_url.include?("data:image") and @include_css_data_images image_url