Skip to content

Instantly share code, notes, and snippets.

@arashm
Created March 16, 2014 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arashm/9586267 to your computer and use it in GitHub Desktop.
Save arashm/9586267 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'nokogiri'
require 'open-uri'
doc = Nokogiri::HTML(open('http://wallbase.cc/toplist'))
doc.css('div.wrapper a img').each_with_index do |img, i|
image_name = img['data-original'].split('-').last
link = "http://wallpapers.wallbase.cc/rozne/wallpaper-#{image_name}"
puts "Downloadin Wallpaper #{i}: #{image_name}"
system "wget -c #{link}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment