1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-11-25 08:38:59 +00:00
This commit is contained in:
Lynne Megido 2019-09-11 15:43:44 +10:00
parent 8b16e698c8
commit de0505004d

View file

@ -14,7 +14,7 @@ def scrape_posts(account):
last_post = 0 last_post = 0
c.execute("SELECT COUNT(*) FROM `posts` WHERE `fedi_id` = %s", (handle,)) c.execute("SELECT COUNT(*) FROM `posts` WHERE `fedi_id` = %s", (handle,))
count = c.fetchone() 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 # we've downloaded this user's posts before
# find out the most recently downloaded post of theirs # 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,)) c.execute("SELECT `post_id` FROM `posts` WHERE `fedi_id` = %s ORDER BY `id` DESC LIMIT 1", (handle,))