handle newer pleroma instances

This commit is contained in:
Lynne Megido 2020-03-10 17:26:31 +10:00
parent ab0400885e
commit 853d5df129
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90

View File

@ -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)