Created
June 10, 2009 10:42
-
-
Save kitallis/127144 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#There are 87 images, use as ruby ragetiem.rb [START] [END] | |
require 'net/http' | |
if !test ?d, "ragetiem" : Dir.mkdir("ragetiem"); Dir.chdir("ragetiem") else Dir.chdir("ragetiem") end | |
(ARGV[0] || 1).upto(ARGV[1] || 87) { |i| puts "Processing #{i}" | |
Net::HTTP.start("www.supercamel.id.au") { |http| img = http.get("/ragetiem/images/" + i.to_s + ".jpg"); open(i.to_s + ".jpg", "wb") { |f| f.write(img.body) } } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment