How to check if a string is a URL in Python code example
Example: python check if string is url
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")