From 06cc74328009a896116c77c10c5687eade66ff7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Sat, 25 May 2024 10:50:42 +0200 Subject: Fix change detection - compare against latest only --- urldelta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/urldelta.py b/urldelta.py index d45a442..1808615 100755 --- a/urldelta.py +++ b/urldelta.py @@ -62,7 +62,7 @@ def get_page_delta(url): data = cursor.fetchone() if data: id, last_fetched = data - cursor.execute("SELECT content FROM deltas WHERE website_id = ?", (id,)) + cursor.execute("SELECT content FROM deltas WHERE website_id = ? ORDER BY fetch_date desc LIMIT 1", (id,)) last_content = cursor.fetchone() if last_content: last_content = last_content[0] -- cgit v1.2.3