Last active
August 29, 2015 14:04
-
-
Save cloudhuang/5cb23f042af3c6d2f354 to your computer and use it in GitHub Desktop.
Download all episodes from http://download.orfjackal.net/lets-code/ for TDD learning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Required for windows: | |
# Download wget utlity for windows | |
require 'nokogiri' | |
require 'open-uri' | |
# Get a Nokogiri::HTML::Document for the page we’re interested in... | |
doc = Nokogiri::HTML(open('http://download.orfjackal.net/lets-code/')) | |
# Do funky things with it using Nokogiri::XML::Node methods... | |
#### | |
doc.xpath('//td/a').each do |link| | |
`wget http://download.orfjackal.net/lets-code/"#{link.values[0]}"` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment