Lynnesbian / mstdn-ebooks

NO LONGER BEING UPDATED, NOT GUARANTEED TO WORK AT ALL
Mozilla Public License 2.0
34 stars 28 forks source link

Mastodon users with one post break the script. #29

Closed sable-starflower closed 4 years ago

sable-starflower commented 5 years ago

I have a user with one post which breaks the script with the following error:

Using config.json as configuration file
Downloading posts for user @robin, starting from 0
WebFingering...
Using Pleroma compatibility mode
Traceback (most recent call last):
  File "main.py", line 199, in <module>
    j = j['first']
KeyError: 'first'

The issue seems to be that the JSON being returned does not contain a next field (presumably because there are no next posts to load) and so the script assumes Pleroma compatibility mode is needed, which then causes the rest of the script to fail.

Lynnesbian commented 4 years ago

this should be fixed now - feel free to reopen if it's not