Let's have a simple argparser with one argument which shall represent URL.
from argparse import ArgumentParser
def my_url(arg):
"""
Some url validation
"""
parser = ArgumentParser(
description="foobar"
)
parser.add_argument(
"-u",
"--url",
type=my_url,
help="foobar",
)
Is there ready up to take function to validate if argument is URL in order to omit my_url custom validation function?