mirror of https://gitlab.com/bashrc2/epicyon
More internet exotica: domains with appended handles
parent
b804db588c
commit
ebfe4317aa
2
posts.py
2
posts.py
|
|
@ -4143,6 +4143,8 @@ def send_to_followers(server, session, session_onion, session_i2p,
|
||||||
# randomize the order of sending to instances
|
# randomize the order of sending to instances
|
||||||
randomized_instances: list[str] = []
|
randomized_instances: list[str] = []
|
||||||
for follower_domain, follower_handles in grouped.items():
|
for follower_domain, follower_handles in grouped.items():
|
||||||
|
if '<' in follower_domain:
|
||||||
|
follower_domain = follower_domain.split('<')[0]
|
||||||
randomized_instances.append([follower_domain, follower_handles])
|
randomized_instances.append([follower_domain, follower_handles])
|
||||||
random.shuffle(randomized_instances)
|
random.shuffle(randomized_instances)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,8 @@ def site_is_active(url: str, timeout: int,
|
||||||
"""
|
"""
|
||||||
if '<>' in url:
|
if '<>' in url:
|
||||||
url = url.replace('<>', '')
|
url = url.replace('<>', '')
|
||||||
|
if '<' in url:
|
||||||
|
url = url.split('<')[0]
|
||||||
if not url.startswith('http') and \
|
if not url.startswith('http') and \
|
||||||
not url.startswith('ipfs') and \
|
not url.startswith('ipfs') and \
|
||||||
not url.startswith('ipns'):
|
not url.startswith('ipns'):
|
||||||
|
|
|
||||||
4
utils.py
4
utils.py
|
|
@ -1512,6 +1512,10 @@ def get_domain_from_actor(actor: str) -> (str, int):
|
||||||
domain = domain.replace(prefix, '')
|
domain = domain.replace(prefix, '')
|
||||||
if '/' in actor:
|
if '/' in actor:
|
||||||
domain = domain.split('/')[0]
|
domain = domain.split('/')[0]
|
||||||
|
if '<' in domain:
|
||||||
|
# handle domain with handle appended
|
||||||
|
# https://domain<user@domain>
|
||||||
|
domain = domain.split('<')[0]
|
||||||
if ':' in domain:
|
if ':' in domain:
|
||||||
port = get_port_from_domain(domain)
|
port = get_port_from_domain(domain)
|
||||||
domain = remove_domain_port(domain)
|
domain = remove_domain_port(domain)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue