Switch from rssparser 3.3 to (the renamed) feedparser 4.1 in order to properly handle Bugzilla RSS feeds.

This commit is contained in:
James Vega 2007-05-09 02:30:18 +00:00
parent 29778f5ada
commit 8111c48a49
2 changed files with 837 additions and 550 deletions

1353
plugins/RSS/rssparser.py → plugins/RSS/feedparser.py Normal file → Executable file

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@ import socket
import sgmllib
import threading
import rssparser
import feedparser
import supybot.conf as conf
import supybot.utils as utils
@ -227,11 +227,11 @@ class RSS(callbacks.Plugin):
if self.willGetNewFeed(url):
try:
self.log.debug('Downloading new feed from %u', url)
results = rssparser.parse(url)
results = feedparser.parse(url)
if 'bozo_exception' in results:
raise results['bozo_exception']
except sgmllib.SGMLParseError:
self.log.exception('Uncaught exception from rssparser:')
self.log.exception('Uncaught exception from feedparser:')
raise callbacks.Error, 'Invalid (unparsable) RSS feed.'
except socket.timeout:
return error('Timeout downloading feed.')