Class: FeedNormalizer::SimpleRssParser

Inherits:
Parser
  • Object
show all
Defined in:
lib/parsers/simple-rss.rb

Overview

The SimpleRSS parser can handle both RSS and Atom feeds.

Class Method Summary collapse

Class Method Details

.parse(xml, loose) ⇒ Object



49
50
51
52
53
54
55
56
57
58
# File 'lib/parsers/simple-rss.rb', line 49

def self.parse(xml, loose)
  begin
    atomrss = parser.parse(xml)
  rescue Exception => e
    #puts "Parser #{parser} failed because #{e.message.gsub("\n",', ')}"
    return nil
  end

  package(atomrss)
end

.parserObject



45
46
47
# File 'lib/parsers/simple-rss.rb', line 45

def self.parser
  SimpleRSS
end

.priorityObject

Fairly low priority; a slower, liberal parser.



61
62
63
# File 'lib/parsers/simple-rss.rb', line 61

def self.priority
  900
end