code: def extract(url):
      
      parts = split(url)
      if parts.scheme:
          netloc = parts.netloc
          path = parts.path
      else:
          netloc = parts.path
          path = ''
          if '/' in netloc:
              netloc, path_raw = netloc.split('/', 1)
              path = '/' + path_raw
      username, password, host, port = split_netloc(netloc)
      subdomain, domain, tld = split_host(host)
      return URL(parts.scheme, username, password, subdomain, domain, tld,
                 port, path, parts.query, parts.fragment, url)
docs: Extract as much information from a (relative) URL as possible.
  
      >>> extract('example.com/abc')
      URL(..., domain='example', tld='com', ..., path='/abc', ...)