]> git.sommitrealweird.co.uk Git - rss2maildir.git/blobdiff - rss2maildir.py
Fix issue with images having the same alt value but different urls
[rss2maildir.git] / rss2maildir.py
index d36b48967a433761e622c43b660a57f4dc92af9e..86387f96ac01c2d8c1dfa12e9e6f4efddef92d27 100755 (executable)
@@ -313,12 +313,11 @@ class HTML2Text(HTMLParser):
                     else:
                         while self.images.has_key(alt):
                             alt = alt + "_"
                     else:
                         while self.images.has_key(alt):
                             alt = alt + "_"
-                        self.images[alt]["url"] = url
+                        self.images[alt] = {"url": url}
                         self.curdata = self.curdata \
                             + u'|%s|' %(alt,)
                 else:
                         self.curdata = self.curdata \
                             + u'|%s|' %(alt,)
                 else:
-                    self.images[alt] = {}
-                    self.images[alt]["url"] = url
+                    self.images[alt] = {"url": url}
                     self.curdata = self.curdata \
                         + u'|%s|' %(alt,)
             else:
                     self.curdata = self.curdata \
                         + u'|%s|' %(alt,)
             else: