From 905859a4babc0eeaa94176e7e9e299f53102bfbe Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 10 Mar 2024 08:50:49 +0200 Subject: [PATCH] fix 500 errors --- files/helpers/offsite_mentions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/helpers/offsite_mentions.py b/files/helpers/offsite_mentions.py index 5ec88e7dc..a4f8d191c 100644 --- a/files/helpers/offsite_mentions.py +++ b/files/helpers/offsite_mentions.py @@ -125,7 +125,8 @@ def fourchan_mentions_task(): def soyjak_mentions_task(): for q in OFFSITE_NOTIF_QUERIES: url = f'https://api.marge.moe/search?q={q}' - data = requests.get(url, headers={"User-Agent": "MarseyFromWPD"}, timeout=20, proxies=proxies).json()['results'] + try: data = requests.get(url, headers={"User-Agent": "MarseyFromWPD"}, timeout=20, proxies=proxies).json()['results'] + except: return for thing in data: text = f'

{thing["comment"]}

'