if item.has_key("content"):
content = item["content"][0]["value"]
else:
- content = item["description"]
+ if item.has_key("description"):
+ content = item["description"]
+ else:
+ content = u''
md5sum = md5.md5(content.encode("utf-8")).hexdigest()
pass
msg.add_header("Date", createddate)
subj_gen = HTML2Text()
- title = item["title"].encode("utf-8")
+ title = item["title"]
title = re.sub(u'<', u'<', title)
title = re.sub(u'>', u'>', title)
- subj_gen.feed(title)
+ subj_gen.feed(title.encode("utf-8"))
msg.add_header("Subject", subj_gen.gettext())
msg.set_default_type("text/plain")