Skip to content

Instantly share code, notes, and snippets.

@orlando
Created January 3, 2012 16:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save orlando/1555684 to your computer and use it in GitHub Desktop.
Save orlando/1555684 to your computer and use it in GitHub Desktop.
destroyallsoftware cheap screencast downloader
#!/usr/bin/ruby
require 'rss'
#this assumes you have a cookies.txt with destroyallsoftware.com cookies... later ill add a signin method..
class Link
attr_accessor :link,:title,:date
def initialize(link,title,date)
@link = link
@title = title
@date = date
end
def filename
"#{self.date.strftime("%F")}-#{self.link.split('/')[-2]}.mov"
end
def download
p %x(wget -c #{self.link} --load-cookies cookies.txt -O #{self.filename})
end
end
rss_string = open('https://www.destroyallsoftware.com/screencasts/feed').read
rss = RSS::Parser.parse(rss_string, false)
links = rss.items.map {|item| Link.new(item.link+"/download",item.title,item.pubDate)}
links.each do |link| link.download end
@bf4
Copy link

bf4 commented Feb 13, 2013

@orlando
Copy link
Author

orlando commented Apr 5, 2018

@bf4 lol just saw your message, this one is shorter, but I don't know if it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment