code: def url_host(url: str) -> str:
      
      from urllib.parse import urlparse
      res = urlparse(url)
      return res.netloc.split(':')[0] if res.netloc else ''
docs: Parses hostname from URL.
      :param url: URL
      :return: hostname