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

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)