From 284dfbc30ede95d2f23e6f9575b5b44080a1090c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 3 Sep 2022 16:24:16 +0200 Subject: [PATCH] ignore archiveorg errors --- files/helpers/actions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index aedfd579c..3dbfe765b 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -29,7 +29,8 @@ def badge_grant(user, badge_id, description=None, url=None): def archiveorg(url): - x = requests.get(f'https://web.archive.org/save/{url}', headers={'User-Agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}, timeout=100) + try: requests.get(f'https://web.archive.org/save/{url}', headers={'User-Agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}, timeout=100) + except: pass def archive_url(url): if url.startswith(SITE_FULL): return