From de0505004df9db73a95a937f2adacda9db950a20 Mon Sep 17 00:00:00 2001 From: Lynne Date: Wed, 11 Sep 2019 15:43:44 +1000 Subject: [PATCH] oops --- scrape.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrape.py b/scrape.py index 790eaa7..41f5791 100644 --- a/scrape.py +++ b/scrape.py @@ -14,7 +14,7 @@ def scrape_posts(account): last_post = 0 c.execute("SELECT COUNT(*) FROM `posts` WHERE `fedi_id` = %s", (handle,)) count = c.fetchone() - if count is not None and count > 0: + if count is not None and count[0] > 0: # we've downloaded this user's posts before # find out the most recently downloaded post of theirs c.execute("SELECT `post_id` FROM `posts` WHERE `fedi_id` = %s ORDER BY `id` DESC LIMIT 1", (handle,))