I have written the following simple script to parse reddit/r/documentaries
require 'open-uri'
require 'nokogiri'
top_docs = Nokogiri::XML(open("http://www.reddit.com/r/Documentaries/top.rss"))
top_docs.xpath('//item').each do |documentary|
documentary_description = documentary.xpath('description')
end
I am trying to gather an array of all the hyperlinks within documentary_description. What selector / method should I use to accomplish this?
Thanks