X-Git-Url: https://git.sommitrealweird.co.uk/rss2maildir.git/blobdiff_plain/629cdfb564c31d54236ba24cd6d891cba1c2308a..5d3c474c51fe355462197e515cbc1d23be4a6cfa:/rss2maildir.py diff --git a/rss2maildir.py b/rss2maildir.py index 910b8a9..113d931 100755 --- a/rss2maildir.py +++ b/rss2maildir.py @@ -180,21 +180,17 @@ class HTML2Text(HTMLParser): url = u'' for attr in attrs: if attr[0] == 'alt': - alt = attr[1] + alt = attr[1].decode('utf-8') elif attr[0] == 'src': - url = attr[1] + url = attr[1].decode('utf-8') if url: self.curdata = self.curdata \ + u' [img:' \ - + unicode( \ - url.encode('utf-8'), \ - 'utf-8') + + url if alt: self.curdata = self.curdata \ + u'(' \ - + unicode( \ - alt.encode('utf-8'), \ - 'utf-8') \ + + alt \ + u')' self.curdata = self.curdata \ + u']'