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]
headlines = [d['title'].strip().replace('\n', ' ') \
for d in feed['items']]
while reduce(operator.add, map(len, headlines), 0) > 350:
headlines.pop()
if not headlines:
headlines = map(utils.htmlToText, headlines)
payload = ircutils.privmsgPayload(headlines, ' :: ')
if not payload:
irc.error(msg, 'Error grabbing RSS feed')
return
response = ' :: '.join(headlines)
irc.reply(msg, response)
irc.reply(msg, payload)
def rssinfo(self, irc, msg, args):
"""<url>