chore: Changed warning text, and some logging values

This commit is contained in:
A.M. Rowsell 2025-03-16 02:20:10 -04:00
parent b72f1d7291
commit ce71ef1e81
Signed by: amr
GPG key ID: 0B6E2D8375CF79A9

View file

@ -89,7 +89,7 @@ def setupPaths():
Path(config_dir).mkdir(parents=True, exist_ok=True)
except FileExistsError:
print(
"The config dir {} already exists and is not a directory! Please fix manually.".format(
"The config dir {} already exists and is not a directory! Please fix manually. Quitting!".format(
config_dir
)
)
@ -138,11 +138,12 @@ def main():
else:
continue
if bad_time is True:
logger.warning(
logger.debug(
"Feed %s doesn't supply a published time, using updated time instead",
hook["name"],
)
# Hash the title and time of the latest post and use that to determine if it's been posted
# Yes, SHA3-512 is totally unnecessary for this purpose, but I love SHA3
new_hash = hashlib.sha3_512(
bytes(latest_post["title"] + str(published_time), "utf-8")
).hexdigest()