You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
274 B
Python
13 lines
274 B
Python
1 month ago
|
# -*- encoding: utf-8 -*-
|
||
|
# @Author: SWHL
|
||
|
# @Contact: liekkaskono@163.com
|
||
|
from urllib.parse import urlparse
|
||
|
|
||
|
|
||
|
def is_url(url: str) -> bool:
|
||
|
try:
|
||
|
result = urlparse(url)
|
||
|
return all([result.scheme, result.netloc])
|
||
|
except Exception:
|
||
|
return False
|