H
Hd Pwnz0r
require 'net/http'
puts "Enter the URL of the site you want to download from (You must have
http:// and www. if the site has it). e.g. http://www.google.com"
site = gets.chomp.to_s
puts "Enter the sub-URL of the file you want to download. e.g.
/img/1.png"
subURL = gets.chomp.to_i
puts "The file will download into the directory this script is placed
in."
Net::HTTP.start("#{site}") { |http|
resp = http.get("#{subURL}")
open("fun.jpg", "wb") { |file|
file.write(resp.body)
}
}
puts "Done!"
Again, an error. This time this script is for easily downloading videos
that play in the browser etc.
puts "Enter the URL of the site you want to download from (You must have
http:// and www. if the site has it). e.g. http://www.google.com"
site = gets.chomp.to_s
puts "Enter the sub-URL of the file you want to download. e.g.
/img/1.png"
subURL = gets.chomp.to_i
puts "The file will download into the directory this script is placed
in."
Net::HTTP.start("#{site}") { |http|
resp = http.get("#{subURL}")
open("fun.jpg", "wb") { |file|
file.write(resp.body)
}
}
puts "Done!"
Again, an error. This time this script is for easily downloading videos
that play in the browser etc.