diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-07-11 12:42:17 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-07-11 12:42:17 +0000 |
commit | e7bfc25740c5b769b5bccec06d9bf623044d8b3e (patch) | |
tree | f83a7e43ac50784e577479834930acd286210d89 | |
parent | 5b8283d2adb556614dfca836b26a7bc887a4f9b6 (diff) |
fix for new xml format
-rw-r--r-- | rbot/plugins/freshmeat.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rbot/plugins/freshmeat.rb b/rbot/plugins/freshmeat.rb index 502261a0..63eaf4c6 100644 --- a/rbot/plugins/freshmeat.rb +++ b/rbot/plugins/freshmeat.rb @@ -70,7 +70,7 @@ class FreshmeatPlugin < Plugin def freshmeat(m, max=4) max = 8 if max > 8 - xml = Utils.http_get("http://download.freshmeat.net/backend/fm-releases-software.rdf") + xml = Utils.http_get("http://images.feedstermedia.com/feedcache/ostg/freshmeat/fm-releases-global.xml") unless xml m.reply "freshmeat news parse failed" return @@ -84,7 +84,7 @@ class FreshmeatPlugin < Plugin max_width = 60 title_width = 0 done = 0 - doc.elements.each("*/item") {|e| + doc.elements.each("*/channel/item") {|e| desc = e.elements["description"].text title = e.elements["title"].text #title.gsub!(/\s+\(.*\)\s*$/, "") @@ -96,10 +96,10 @@ class FreshmeatPlugin < Plugin } matches.each {|mat| title = mat[0] - desc = mat[1] - desc.gsub!(/(.{#{max_width - 3 - title_width}}).*/, '\1..') - reply = sprintf("%#{title_width}s | %s", title, desc) - m.reply reply + #desc = mat[1] + #desc.gsub!(/(.{#{max_width - 3 - title_width}}).*/, '\1..') + #reply = sprintf("%#{title_width}s | %s", title, desc) + m.reply title } end end |