goalie.is_url

goalie.is_url(x: object) bool

Check whether the input contains a URL.

Simple pattern match; does not verify that the URL exists.

Parameters:

x (object) – Value to check.

Returns:

True if x looks like a URL.

Return type:

bool

Examples

>>> is_url("https://www.python.org/")
True
>>> is_url("xxx")
False