Initial commit
This commit is contained in:
parent
1b85c08c58
commit
86272fd846
1 changed files with 19 additions and 0 deletions
19
script.rb
Normal file
19
script.rb
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/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
|
Reference in a new issue