Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Download a collection of images from URLs using Ruby
require 'open-uri'
def download_image(url, dest)
open(url) do |u|, 'wb') { |f| f.write( }
urls = [
urls.each { |url| download_image(url, url.split('/').last) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment