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) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/parsers/simple-rss.rb', line 12

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

  package(atomrss)
end

.parserObject



8
9
10
# File 'lib/parsers/simple-rss.rb', line 8

def self.parser
  SimpleRSS
end

.priorityObject

Fairly low priority; a slower, liberal parser.



24
25
26
# File 'lib/parsers/simple-rss.rb', line 24

def self.priority
  900
end