main
Bob Mottram 2020-02-06 12:15:27 +00:00
parent ac38dbbb36
commit 4d5b75c982
2 changed files with 7 additions and 2 deletions

View File

@ -973,6 +973,11 @@ if args.actor:
if '/channel/' in personUrl: if '/channel/' in personUrl:
asHeader = {'Accept': 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'} asHeader = {'Accept': 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'}
personJson = getJson(session,personUrl,asHeader,None,__version__,httpPrefix,None) personJson = getJson(session,personUrl,asHeader,None,__version__,httpPrefix,None)
if personJson:
pprint(personJson)
else:
asHeader = {'Accept': 'application/jrd+json; profile="https://www.w3.org/ns/activitystreams"'}
personJson = getJson(session,personUrl,asHeader,None,__version__,httpPrefix,None)
if personJson: if personJson:
pprint(personJson) pprint(personJson)
else: else:

View File

@ -58,7 +58,7 @@ def webfingerHandle(session,handle: str,httpPrefix: str,cachedWebfingers: {}, \
par = {'resource': 'acct:{}'.format(nickname+'@'+wfDomain)} par = {'resource': 'acct:{}'.format(nickname+'@'+wfDomain)}
hdr = {'Accept': 'application/jrd+json'} hdr = {'Accept': 'application/jrd+json'}
try: try:
result = getJson(session, url, hdr, par,projectVersion,httpPrefix,fromDomain) result = getJson(session,url,hdr,par,projectVersion,httpPrefix,fromDomain)
except Exception as e: except Exception as e:
print("Unable to webfinger " + url) print("Unable to webfinger " + url)
print('nickname: '+str(nickname)) print('nickname: '+str(nickname))