summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2024-05-25 10:50:42 +0200
committerAndré Glüpker <git@wgmd.de>2024-05-25 10:50:42 +0200
commit06cc74328009a896116c77c10c5687eade66ff7d (patch)
tree786e0ca88470bc90db1ef6e5baae6837ac1ad05a
parent24eb5ad088b365c4189003282014403b74ad2249 (diff)
downloadrss-feeds-06cc74328009a896116c77c10c5687eade66ff7d.tar.gz
rss-feeds-06cc74328009a896116c77c10c5687eade66ff7d.tar.bz2
rss-feeds-06cc74328009a896116c77c10c5687eade66ff7d.zip
Fix change detection - compare against latest only
-rwxr-xr-xurldelta.py2
1 files changed, 1 insertions, 1 deletions
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]