mirror of https://gitlab.com/bashrc2/epicyon
url checking suitable for yggdrassil address
parent
594d08cc6d
commit
3fcf7e702c
3
utils.py
3
utils.py
|
|
@ -3953,7 +3953,8 @@ def get_reply_to(post_json_object: {}) -> str:
|
|||
def resembles_url(text: str) -> bool:
|
||||
"""Does the given text look like a url?
|
||||
"""
|
||||
if '://' in text and '.' in text and \
|
||||
if '://' in text and \
|
||||
('.' in text or ('[' in text and ']' in text and ':' in text)) and \
|
||||
' ' not in text and '<' not in text:
|
||||
return True
|
||||
return False
|
||||
|
|
|
|||
Loading…
Reference in New Issue