From ed775ddbe3d66d1218ce034de97ad4ea641002bf Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 26 Nov 2019 11:35:56 +0000 Subject: remove `parser` from utils.http.Request, add Request.soup() --- modules/fediverse/ap_utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/fediverse') diff --git a/modules/fediverse/ap_utils.py b/modules/fediverse/ap_utils.py index fc6ea5fd..686b8850 100644 --- a/modules/fediverse/ap_utils.py +++ b/modules/fediverse/ap_utils.py @@ -38,8 +38,7 @@ class FindActorException(Exception): def find_actor(username, instance): hostmeta = HOSTMETA_TEMPLATE % instance - hostmeta_request = utils.http.Request(HOSTMETA_TEMPLATE % instance, - parse=True, check_content_type=False) + hostmeta_request = utils.http.Request(HOSTMETA_TEMPLATE % instance) try: hostmeta = utils.http.request(hostmeta_request) except: @@ -47,7 +46,7 @@ def find_actor(username, instance): webfinger_url = None if hostmeta.code == 200: - for item in hostmeta.data.find_all("link"): + for item in hostmeta.soup().find_all("link"): if item["rel"] and item["rel"][0] == "lrdd": webfinger_url = item["template"] break -- cgit v1.3.1-10-gc9f91