From 8f5fff289df9590ff0f8b2f7b397b119d7b835b0 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Thu, 9 Mar 2023 10:14:12 +0000 Subject: [PATCH] fix the bug for `seen_urls` --- get_context.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get_context.py b/get_context.py index 38a67b8..b7c0cc5 100644 --- a/get_context.py +++ b/get_context.py @@ -495,7 +495,7 @@ Usage: python3 pull_context.py ) with open(SEEN_URLS_FILE, "w", encoding="utf-8") as f: - f.write("\n".join(list(SEEN_URLS)[:10000])) + f.write("\n".join(list(SEEN_URLS)[-10000:])) with open(REPLIED_TOOT_SERVER_IDS_FILE, "w", encoding="utf-8") as f: - json.dump(dict(list(REPLIED_TOOT_SERVER_IDS.items())[:10000]), f) + json.dump(dict(list(REPLIED_TOOT_SERVER_IDS.items())[-10000:]), f)