📌  相关文章
📜  python 检查字符串是否为 url - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:15.686000             🧑  作者: Mango

代码示例1
from django.core.validators import URLValidator()
validate = URLValidator()

try:
    validate("http://www.avalidurl.com/")
    print("String is a valid URL")
except ValidationError as exception:
    print("String is not valid URL")