Added sha3_512 hash of post title, to migrate from using time
This commit is contained in:
parent
bd693f6f42
commit
87193d0f94
1 changed files with 2 additions and 1 deletions
|
@ -69,7 +69,8 @@ def main():
|
|||
published_time = time.mktime(feed.entries[0]["published_parsed"])
|
||||
published_time = published_time + hook["offset"]
|
||||
print("Parsing feed {}...".format(hook["name"]))
|
||||
new_hash = hashlib.sha3_512(feed.entries[0]["title"])
|
||||
# Hash the title of the latest post and use that to determine if it's been posted
|
||||
new_hash = hashlib.sha3_512(bytes(feed.entries[0]["title"], 'utf-8')).hexdigest()
|
||||
try:
|
||||
if hook["lasthash"] != new_hash:
|
||||
app_config["feeds"][i]["lasthash"] = new_hash
|
||||
|
|
Loading…
Add table
Reference in a new issue