From dada8514e4a8022ab199fc3748a6149c3bf6bb6d Mon Sep 17 00:00:00 2001 From: Lynnesbian Date: Wed, 18 Mar 2020 15:06:03 +1000 Subject: [PATCH] don't override manually set done value --- app/scrape.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/scrape.py b/app/scrape.py index 054a556..e9af680 100755 --- a/app/scrape.py +++ b/app/scrape.py @@ -30,6 +30,8 @@ def scrape_posts(account): c.execute("SELECT `post_id` FROM `posts` WHERE `fedi_id` = %s ORDER BY `id` DESC LIMIT 1", (handle,)) last_post = c.fetchone()[0] + done = False + try: r = requests.get(outbox, timeout = 10) j = r.json() @@ -49,7 +51,6 @@ def scrape_posts(account): # here we go! # warning: scraping posts from outbox.json is messy stuff - done = False while not done and len(j['orderedItems']) > 0: for oi in j['orderedItems']: if oi['type'] == "Create":