lib/image_scraper/client.rb in image_scraper-0.1.3 vs lib/image_scraper/client.rb in image_scraper-0.1.4

- old
+ new

@@ -6,10 +6,11 @@ options.reverse_merge!(:convert_to_absolute_url=>true,:include_css_images=>true, :include_css_data_images=>false) @url = url @convert_to_absolute_url = options[:convert_to_absolute_url] @include_css_images = options[:include_css_images] @include_css_data_images = options[:include_css_data_images] - @doc = Nokogiri::HTML(open url) + html = open(url).read + @doc = Nokogiri::HTML(html) end def image_urls images = page_images images += stylesheet_images if include_css_images \ No newline at end of file