From df559c6af59e187adb3c5604dd47625d927931c5 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 31 Oct 2022 02:05:53 +0200 Subject: [PATCH] run archival through proxy --- files/helpers/actions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 9686bcb27..04f6ccbda 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -31,9 +31,9 @@ def badge_grant(user, badge_id, description=None, url=None, notify=True): headers = {'User-Agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'} def archiveorg(url): - try: requests.get(f'https://web.archive.org/save/{url}', headers=headers, timeout=10) + try: requests.get(f'https://web.archive.org/save/{url}', headers=headers, timeout=10, proxies=proxies) except: pass - requests.post('https://ghostarchive.org/archive2', data={"archive": url}, headers=headers, timeout=10) + requests.post('https://ghostarchive.org/archive2', data={"archive": url}, headers=headers, timeout=10, proxies=proxies) def archive_url(url):