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]
|
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>
|
||||||
|
Loading…
Reference in New Issue
Block a user