Module: Rutt::Opml
- Defined in:
- lib/rutt/opml.rb
Class Method Summary collapse
Class Method Details
.get_urls(file) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rutt/opml.rb', line 3 def self.get_urls(file) doc = Nokogiri::XML(open(file)) urls = [] doc.xpath('opml/body/outline').each do |outline| if outline['xmlUrl'] urls << outline['xmlUrl'] else (outline/'outline').each do |outline2| urls << outline2['xmlUrl'] end end end return urls end |