From 4d5b75c98256cfd134c618ef20c83885a036aeab Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 6 Feb 2020 12:15:27 +0000 Subject: [PATCH] Tidying --- epicyon.py | 7 ++++++- webfinger.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/epicyon.py b/epicyon.py index d03e53dd..fab50ffb 100644 --- a/epicyon.py +++ b/epicyon.py @@ -976,7 +976,12 @@ if args.actor: if personJson: pprint(personJson) else: - print('Failed to get '+personUrl) + asHeader = {'Accept': 'application/jrd+json; profile="https://www.w3.org/ns/activitystreams"'} + personJson = getJson(session,personUrl,asHeader,None,__version__,httpPrefix,None) + if personJson: + pprint(personJson) + else: + print('Failed to get '+personUrl) sys.exit() if args.addaccount: diff --git a/webfinger.py b/webfinger.py index 2ade5f2b..a3fe3310 100644 --- a/webfinger.py +++ b/webfinger.py @@ -58,7 +58,7 @@ def webfingerHandle(session,handle: str,httpPrefix: str,cachedWebfingers: {}, \ par = {'resource': 'acct:{}'.format(nickname+'@'+wfDomain)} hdr = {'Accept': 'application/jrd+json'} try: - result = getJson(session, url, hdr, par,projectVersion,httpPrefix,fromDomain) + result = getJson(session,url,hdr,par,projectVersion,httpPrefix,fromDomain) except Exception as e: print("Unable to webfinger " + url) print('nickname: '+str(nickname))