mirror of
https://github.com/fmap/muflax65ngodyewp.onion
synced 2024-06-29 10:36:48 +02:00
21 lines
517 B
Ruby
Executable file
21 lines
517 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 = `./extract_links.sh | grep -P 'https?://.*(#{hosts.join "|"})[^\"]*\\b' | sort -u`
|
|
|
|
Dir.chdir "video-backup"
|
|
urls.split.each do |url|
|
|
puts "backing up #{url}..."
|
|
system "cclive -c --max-retries 0 '#{url}'"
|
|
end
|