summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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]