forked from indymedia/epicyon
Avoid duplicate prefixes
parent
6e769484aa
commit
d523a6354d
3
utils.py
3
utils.py
|
@ -242,8 +242,7 @@ def getDomainFromActor(actor: str) -> (str, int):
|
||||||
"""Returns the domain name from an actor url
|
"""Returns the domain name from an actor url
|
||||||
"""
|
"""
|
||||||
port = None
|
port = None
|
||||||
prefixes = ('https://', 'http://', 'dat://', 'i2p://', 'gnunet://',
|
prefixes = getProtocolPrefixes()
|
||||||
'hyper://', 'gemini://', 'gopher://')
|
|
||||||
if '/profile/' in actor:
|
if '/profile/' in actor:
|
||||||
domain = actor.split('/profile/')[0]
|
domain = actor.split('/profile/')[0]
|
||||||
for prefix in prefixes:
|
for prefix in prefixes:
|
||||||
|
|
Loading…
Reference in New Issue