From a2353add618b587b0c0f34a91bce7190cfc65cb7 Mon Sep 17 00:00:00 2001 From: Thomas Wade Date: Thu, 3 Dec 2020 23:39:18 +1030 Subject: [PATCH] Handle JSON parsing errors --- FAAPI/FAAPI.py | 3 +++ setup.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/FAAPI/FAAPI.py b/FAAPI/FAAPI.py index 7386ea7..cc3cf65 100644 --- a/FAAPI/FAAPI.py +++ b/FAAPI/FAAPI.py @@ -398,6 +398,9 @@ class User: except IndexError as e: # Failed to get the description script, don't do anything about it and leave the dict as-is pass + except AttributeError as e: + # The description script isn't what we expected + pass # Get all the submissions on this page for item in soup.select('.gallery figure'): diff --git a/setup.py b/setup.py index 7f78605..0fe3d23 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='FAAPI', - version='0.6.5', + version='0.6.6', packages=find_packages(), url='https://tem.party/gitea/tom/FAAPI', license='WTFPL',