mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-03 01:39:23 +01:00
Made it htmlToText headlines.
This commit is contained in:
parent
8d50d79e7a
commit
ba67e2c8e0
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user