From 9b9a7ebde0fb4a3c7c860f55447171f7f68b5833 Mon Sep 17 00:00:00 2001 From: garret Date: Fri, 5 Jul 2024 15:25:11 +0100 Subject: overwrite expired cache with newer data bit of a pain to test because the site does its own caching when you're not logged in, i ended up just putting bogus data into the db --- fetch-status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fetch-status.py') diff --git a/fetch-status.py b/fetch-status.py index 286ffd3..89abc1e 100755 --- a/fetch-status.py +++ b/fetch-status.py @@ -109,5 +109,5 @@ elif post_body is None: check_status = "mystery" if not cached_result: - cur.execute("INSERT INTO statuses VALUES(?,?,?,?)", (profile_id, post_body, time.time(), check_status)) + cur.execute("INSERT OR REPLACE INTO statuses VALUES(?,?,?,?)", (profile_id, post_body, time.time(), check_status)) con.commit() -- cgit v1.2.3-70-g09d2