From f164ddaa22734642895f76c04c4e04828c4c3d09 Mon Sep 17 00:00:00 2001 From: SouthFox Date: Tue, 8 Nov 2022 02:29:56 +0800 Subject: [PATCH] fix/edited_at compatible with lower versions --- BDSM/toot.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/BDSM/toot.py b/BDSM/toot.py index b719ad1..ee9a7e2 100644 --- a/BDSM/toot.py +++ b/BDSM/toot.py @@ -87,9 +87,12 @@ def toot_process(statuses, my_acct, duplicates_counter=0): url = status['url'] created_at = status['created_at'] - edited_at = status['edited_at'] - if isinstance(edited_at, str): - edited_at = dateutil.parser.parse(status['edited_at']) + if 'edited_at' in status: + edited_at = status['edited_at'] + if isinstance(edited_at, str): + edited_at = dateutil.parser.parse(status['edited_at']) + else: + edited_at = None in_reply_to_id = status['in_reply_to_id'] in_reply_to_account_id = status['in_reply_to_account_id']