20 lines
310 B
Ruby
20 lines
310 B
Ruby
|
#!/bin/env ruby
|
||
|
|
||
|
require 'rss'
|
||
|
require 'open-uri'
|
||
|
require 'youtube-dl'
|
||
|
|
||
|
if ARGV.empty?
|
||
|
puts "Please specify the URL of the feed as a parameter"
|
||
|
exit
|
||
|
end
|
||
|
|
||
|
url=ARGV[0]
|
||
|
|
||
|
open(url) do |rss|
|
||
|
feed=RSS::Parser.parse(rss)
|
||
|
feed.items.each do |item|
|
||
|
YoutubeDL.download "#{item.link}"
|
||
|
end
|
||
|
end
|