# unusual return http code
if parsed_feed.status != 200:
- self.plugin.log.error(
+ self.plugin.log.warning(
'Got code %(status)d from "%(href)s" (please update).' %
parsed_feed)
return
body = '%(title)s %(link)s' % post
text.append(body)
- xpost = dict(**post)
- xpost['title'] = html_escape(xpost.get('title', 'n/a'))
- xbody = '<a href="%(link)s">%(title)s</a>' % xpost
+ xpost = {'title': html_escape(post.get('title', 'n/a'))}
+ xpost['link'] = html_escape(post.get('link',))
+ xbody = '<a href="{link}">{title}</a>'.format(**xpost)
xhtml.append(xbody)
# Updating self.seen
self.seen[feed_id] = entries
if len(text) > 1:
- self.plugin.send({'mbody':'<br />'.join(xhtml), 'mhtml':'\n'.join(text)})
+ self.plugin.send({'mhtml':'<br />'.join(xhtml), 'mbody':'\n'.join(text)})
def run(self):
while not self.thread_killed: