From 853d5df129aea68ba6fe2799d8d840f7f5bb8ee3 Mon Sep 17 00:00:00 2001 From: Lynnesbian Date: Tue, 10 Mar 2020 17:26:31 +1000 Subject: [PATCH] handle newer pleroma instances --- app/scrape.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/scrape.py b/app/scrape.py index 5cbfbe7..205b065 100644 --- a/app/scrape.py +++ b/app/scrape.py @@ -35,7 +35,9 @@ def scrape_posts(account): # check for pleroma pleroma = 'next' not in j if pleroma: - j = j['first'] + if 'first' in j: + # backwards compatibility for older (pre-v1.0.4) pleroma instances + j = j['first'] else: uri = "{}&min_id={}".format(outbox, last_post) r = requests.get(uri)