From: Brett Parker Date: Thu, 20 Dec 2007 22:13:08 +0000 (+0000) Subject: * make db key actually unique for feed url + link url X-Git-Url: https://git.sommitrealweird.co.uk/rss2maildir.git/commitdiff_plain/729c797149e6048e3f48f700e1e4bc2533c3a99d?ds=inline;hp=b3a0ada9892398bd6f22ec779feb7d71836b7d2c * make db key actually unique for feed url + link url --- diff --git a/rss2maildir.py b/rss2maildir.py index aaf883f..d721d0e 100755 --- a/rss2maildir.py +++ b/rss2maildir.py @@ -146,8 +146,8 @@ def parse_and_deliver(maildir, url, statedir): md5sum = md5.md5(content.encode("utf8")).hexdigest() - if db.has_key(item["link"]): - data = db[item["link"]] + if db.has_key(url + "|" + item["link"]): + data = db[url + "|" + item["link"]] data = cgi.parse_qs(data) if data["contentmd5"][0] == md5sum: continue @@ -191,7 +191,7 @@ def parse_and_deliver(maildir, url, statedir): # now add to the database about the item data = urllib.urlencode((("message-id", messageid), ("created", createddate), ("contentmd5", md5sum))) - db[item["link"]] = data + db[url + "|" + item["link"]] = data db.close()