get_url_domain

Documentation for eth_defi.rpc_url.get_url_domain function.

get_url_domain(url)

Display a URL as its hostname and optional non-default port.

Credentials, paths, query parameters and fragments are discarded. Invalid URLs use a fixed placeholder rather than echoing the invalid input.

Parameters

url (str) – An endpoint URL or fallback configuration, including mev+.

Returns

Hostname, with a non-default port when supplied.

Return type

str