From 8d6b7057623ee5a55db3e3bda27857b9b9b3775c Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 15 Jun 2024 12:21:26 +0300 Subject: [PATCH] easier troubleshooting --- files/helpers/offsite_mentions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files/helpers/offsite_mentions.py b/files/helpers/offsite_mentions.py index fdbf2f0da..2ad836f7a 100644 --- a/files/helpers/offsite_mentions.py +++ b/files/helpers/offsite_mentions.py @@ -40,7 +40,7 @@ def reddit_mentions_task(): url = f'https://api.pullpush.io/reddit/search/{kind}?q={q}' try: data = requests.get(url, headers=HEADERS, timeout=20).json()['data'] except Exception as e: - print(e, flush=True) + print(f'reddit mentions: {e}', flush=True) return for thing in data: @@ -77,7 +77,7 @@ def lemmy_mentions_task(): url = f'https://lemm.ee/api/v3/search?q={q}' try: data = requests.get(url, headers=HEADERS, timeout=20, proxies=proxies).json() except Exception as e: - print(e, flush=True) + print(f'lemmy mentions: {e}', flush=True) return for kind in ("post", "comment"): @@ -111,7 +111,7 @@ def fourchan_mentions_task(): url = f'https://archived.moe/_/api/chan/search?text={q}' try: data = requests.get(url, headers=HEADERS, timeout=20, proxies=proxies).json()['0']['posts'] except Exception as e: - print(e, flush=True) + print(f'4chan mentions: {e}', flush=True) return for thing in data: @@ -137,7 +137,7 @@ def soyjak_mentions_task(): url = f'https://api.marge.moe/search?q={q}' try: data = requests.get(url, headers={"User-Agent": "MarseyFromWPD"}, timeout=20, proxies=proxies).json()['results'] except Exception as e: - print(e, flush=True) + print(f'soyjak mentions: {e}', flush=True) return for thing in data: