Made it htmlToText headlines.

This commit is contained in:
Jeremy Fincher 2003-04-17 10:06:11 +00:00
parent 8d50d79e7a
commit ba67e2c8e0

View File

@ -112,13 +112,12 @@ class RSS(callbacks.Privmsg):
feed = self.cachedFeeds[url] feed = self.cachedFeeds[url]
headlines = [d['title'].strip().replace('\n', ' ') \ headlines = [d['title'].strip().replace('\n', ' ') \
for d in feed['items']] for d in feed['items']]
while reduce(operator.add, map(len, headlines), 0) > 350: headlines = map(utils.htmlToText, headlines)
headlines.pop() payload = ircutils.privmsgPayload(headlines, ' :: ')
if not headlines: if not payload:
irc.error(msg, 'Error grabbing RSS feed') irc.error(msg, 'Error grabbing RSS feed')
return return
response = ' :: '.join(headlines) irc.reply(msg, payload)
irc.reply(msg, response)
def rssinfo(self, irc, msg, args): def rssinfo(self, irc, msg, args):
"""<url> """<url>