From ffc2700c4f0627af00e85f5f53af34b05dd8e100 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Thu, 26 Jul 2018 22:39:12 +0200 Subject: [PATCH] Tweak/fix the lookup --- utils/lookup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/lookup.py b/utils/lookup.py index 3bb4756..07627b6 100644 --- a/utils/lookup.py +++ b/utils/lookup.py @@ -15,6 +15,10 @@ def lookup(url: str) -> ap.BaseActivity: return ap.fetch_remote_activity(actor_url) except NotAnActivityError: pass + except requests.HTTPError: + # Some websites may returns 404, 503 or others when they don't support webfinger, and we're just taking a guess + # when performing the lookup. + pass backend = ap.get_backend() resp = requests.get(