Last active
December 31, 2015 12:29
-
-
Save cyfdecyf/7986744 to your computer and use it in GitHub Desktop.
Extract all link from Stanford CS 193P iTunes U feed.
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
require 'nokogiri' | |
require 'open-uri' | |
doc = Nokogiri::XML(open('https://itunesu.itunes.apple.com/WebObjects/LZDirectory.woa/ra/directory/courses/733644550/feed')) | |
doc.css('entry').each do |e| | |
title = e.css('title').first.text | |
link = e.css('link').first.attributes["href"].value | |
puts title | |
puts link | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment