Created
December 1, 2008 06:25
-
-
Save anildigital/30656 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Confreaks - RubyConf2008 Videos downloader script | |
# | |
# Author: Anil Wadghule | |
# | |
require 'open-uri' | |
files_path = "http://rubyconf2008.confreaks.com/videos/" | |
downloadable_file_name_array = [] | |
data = Net::HTTP.get(URI.parse(files_path)) | |
data.each do |line| | |
split_string_array = line.split('"') | |
download_file_name = split_string_array[1] | |
if download_file_name and download_file_name.include?("-small") | |
downloadable_file_name_array << download_file_name | |
end | |
end | |
downloadabled_file_name_array = downloadable_file_name_array.sort | |
for each_file_name in downloadabled_file_name_array | |
downloadable_full_path = files_path + each_file_name | |
puts downloadable_full_path | |
puts system("wget #{downloadable_full_path}") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment