1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-12-27 06:48:59 +00:00

don't override manually set done value

This commit is contained in:
Lynne Megido 2020-03-18 15:06:03 +10:00
parent 996d52d542
commit dada8514e4
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90

View file

@ -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":