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
|
||||
"""
|
||||
port = None
|
||||
prefixes = ('https://', 'http://', 'dat://', 'i2p://', 'gnunet://',
|
||||
'hyper://', 'gemini://', 'gopher://')
|
||||
prefixes = getProtocolPrefixes()
|
||||
if '/profile/' in actor:
|
||||
domain = actor.split('/profile/')[0]
|
||||
for prefix in prefixes:
|
||||
|
|
Loading…
Reference in New Issue