fix 500 errors

pull/225/head
Aevann 2024-03-10 08:50:49 +02:00
parent 8c2db4beee
commit 905859a4ba
1 changed files with 2 additions and 1 deletions

View File

@ -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'<blockquote><p>{thing["comment"]}</p></blockquote>'