1
0
Fork 0
mirror of https://github.com/fmap/muflax65ngodyewp.onion synced 2024-06-29 10:36:48 +02:00
muflax65ngodyewp.onion/backup-videos.rb
2012-02-05 04:52:13 +01:00

21 lines
506 B
Ruby
Executable file

#!/usr/bin/env ruby
# coding: utf-8
# Copyright muflax <mail@muflax.com>, 2011
# License: GNU GPL 3 <http://www.gnu.org/copyleft/gpl.html>
hosts = [
"youtube.com/v",
"youtube.com/watch",
"vimeo.com",
"dailymotion.com",
"video.google.com",
]
urls = `grep -horP 'http://.*(#{hosts.join "|"})[^\"]*\\b' content/ | sort -u`
Dir.chdir "video-backup"
urls.split.each do |url|
puts "backing up #{url}..."
system "cclive -c --max-retries 0 '#{url}'"
end