mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
753a1156fe
commit
d16604b345
6
utils.py
6
utils.py
|
|
@ -4035,8 +4035,10 @@ def resembles_domain(text: str) -> bool:
|
||||||
Why not use validators? It's so that exotic, potentially p2p domains
|
Why not use validators? It's so that exotic, potentially p2p domains
|
||||||
may be used.
|
may be used.
|
||||||
"""
|
"""
|
||||||
if ' ' in text or '/' in text or '-' in text or '<' in text or \
|
not_domain_chars = (
|
||||||
';' in text or '"' in text or '(' in text or ')' in text:
|
' ', '/', '-', '<', ';', '"', '(', ')', '_', ',', '?', "'"
|
||||||
|
)
|
||||||
|
if string_contains(text, not_domain_chars):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# conventional domain
|
# conventional domain
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue