]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
rss plugin: rescue RSS parsing in htmlinfo filter
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 23 Mar 2008 10:29:06 +0000 (11:29 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 23 Mar 2008 10:29:06 +0000 (11:29 +0100)
data/rbot/plugins/rss.rb

index 97640838c3dd56d4bbbcad6f3c116d917bf0ae00..8bf59dfc5af74f0744cb8f8c45a38637f947669b 100644 (file)
@@ -373,8 +373,8 @@ class RSSFeedsPlugin < Plugin
       s[:text].include?("<rdf:RDF") or s[:text].include?("<rss") or s[:text].include?("<feed") or
       s[:text].match(FEED_NS)
     blob = RssBlob.new(s[:headers]['x-rbot-location'],"", :htmlinfo)
-    unless fetchRss(blob, nil) and parseRss(blob, nil)
-      debug "tried to filter #{s.inspect} which is not an RSS feed"
+    unless (fetchRss(blob, nil) and parseRss(blob, nil) rescue nil)
+      debug "#{s.pretty_inspect} is not an RSS feed, despite the appearances"
       return nil
     end
     output = []