mirror of https://gitlab.com/bashrc2/epicyon
Resolving wordpress actors and posts
parent
cb611a6e97
commit
3cebf17bd7
|
@ -1734,6 +1734,8 @@ def get_actor_json(host_domain: str, handle: str, http: bool, gnunet: bool,
|
|||
person_url = original_actor
|
||||
else:
|
||||
handle = nickname + '@' + domain
|
||||
if debug:
|
||||
print('get_actor_json webfinger: ' + handle)
|
||||
wf_request = webfinger_handle(session, handle,
|
||||
http_prefix, cached_webfingers,
|
||||
host_domain, __version__, debug,
|
||||
|
@ -1769,10 +1771,13 @@ def get_actor_json(host_domain: str, handle: str, http: bool, gnunet: bool,
|
|||
)
|
||||
if not person_url and wf_request:
|
||||
person_url = get_user_url(wf_request, 0, debug)
|
||||
if debug and person_url:
|
||||
print('\nget_actor_json getting json for ' + person_url)
|
||||
if nickname == domain:
|
||||
paths = get_user_paths()
|
||||
for user_path in paths:
|
||||
person_url = person_url.replace(user_path, '/actor/')
|
||||
if user_path != '/@':
|
||||
person_url = person_url.replace(user_path, '/actor/')
|
||||
if not person_url and group_account:
|
||||
person_url = http_prefix + '://' + domain + '/c/' + nickname
|
||||
if not person_url:
|
||||
|
|
5
posts.py
5
posts.py
|
@ -360,8 +360,6 @@ def get_person_box(signing_priv_key_pem: str, origin_domain: str,
|
|||
if not person_url:
|
||||
return None, None, None, None, None, None, None, None
|
||||
|
||||
print('get_person_box person_url: ' + person_url)
|
||||
|
||||
# get the actor json from the url
|
||||
person_json = \
|
||||
_get_person_box_actor(session, base_dir, person_url,
|
||||
|
@ -5087,7 +5085,8 @@ def get_public_posts_of_person(base_dir: str, nickname: str, domain: str,
|
|||
else:
|
||||
print('Signing key missing')
|
||||
|
||||
print('Starting new session for getting public posts')
|
||||
if debug:
|
||||
print('Starting new session for getting public posts')
|
||||
session = create_session(proxy_type)
|
||||
if not session:
|
||||
if debug:
|
||||
|
|
2
utils.py
2
utils.py
|
@ -1564,7 +1564,7 @@ def get_user_paths() -> []:
|
|||
return ('/users/', '/profile/', '/accounts/', '/channel/', '/u/',
|
||||
'/c/', '/m/', '/video-channels/', '/author/',
|
||||
'/activitypub/', '/actors/', '/snac/', '/@/', '/~/',
|
||||
'/fediverse/blog/', '/user/')
|
||||
'/fediverse/blog/', '/user/', '/@')
|
||||
|
||||
|
||||
def get_group_paths() -> []:
|
||||
|
|
Loading…
Reference in New Issue