fkie_mas_pylib.system.url module

fkie_mas_pylib.system.url.equal_uri(url1: str, url2: str) bool

Removes to string after remove last slash character.

fkie_mas_pylib.system.url.get_port(url: str) int | None

Extracts the port from given url.

Parameters:

url (str) – the url to parse

Returns:

the port or None, if the url is None or invalid

Return type:

int

See:

http://docs.python.org/library/urlparse.html

fkie_mas_pylib.system.url.split_uri(uri: str) Tuple[str, str, int] | None

Splits URI or address into scheme, address and port and returns them as tuple. Scheme or tuple are empty if no provided. :param str uri: some URI or address :rtype: (str, str, int)