From 871cd07548b23648d285c59759179c781ecf6314 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 24 Oct 2023 18:15:49 +0300 Subject: [PATCH] dont use proxy needlessly --- files/helpers/actions.py | 4 ++-- files/helpers/offsitementions.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 3454a2598..3ce245e80 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -27,10 +27,10 @@ from files.routes.routehelpers import check_for_alts def _archiveorg(url): try: - requests.post('https://ghostarchive.org/archive2', data={"archive": url}, headers=HEADERS, timeout=10, proxies=proxies) + requests.post('https://ghostarchive.org/archive2', data={"archive": url}, headers=HEADERS, timeout=10) except: pass try: - requests.get(f'https://web.archive.org/save/{url}', headers=HEADERS, timeout=10, proxies=proxies) + requests.get(f'https://web.archive.org/save/{url}', headers=HEADERS, timeout=10) except: pass diff --git a/files/helpers/offsitementions.py b/files/helpers/offsitementions.py index 42f477a05..a6ca65f1d 100644 --- a/files/helpers/offsitementions.py +++ b/files/helpers/offsitementions.py @@ -34,7 +34,7 @@ def get_mentions(cache, queries, reddit_notifs_users=False): for kind in ('submission', 'comment'): q = " or ".join(queries) url = f'https://api.pullpush.io/reddit/search/{kind}?q={q}' - try: req = requests.get(url, headers=HEADERS, timeout=5, proxies=proxies) + try: req = requests.get(url, headers=HEADERS, timeout=5) except: return [] data = req.json()['data']