Fix rss-bot parsing of feeds that don't specify a post ID.

(imported from commit 67fdb8b92b39fc14c81b87b7fa8089964c07be8b)
This commit is contained in:
Tim Abbott 2013-11-18 08:00:42 -05:00
parent 30416c860b
commit 3493c4fa76

View file

@ -135,7 +135,8 @@ def strip_tags(html):
def compute_entry_hash(entry):
entry_time = entry.get("published", entry.get("updated"))
return hashlib.md5(entry.id + entry_time).hexdigest()
entry_id = entry.get("id", entry.get("link"))
return hashlib.md5(entry_id + entry_time).hexdigest()
def send_zulip(entry, feed_name):
content = "**[%s](%s)**\n%s\n%s" % (entry.title,