This repository has been archived on 2025-07-13. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
rss2ydl/script.rb
George Kaklamanos 86272fd846 Initial commit
2018-04-29 15:22:53 +03:00

19 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