code: def domain_parse(url):
      
      url = url.lower()
      if not url.startswith('http://') and not url.startswith('https://'):
          url = '{schema}{host}'.format(schema='http://', host=url)
      url = urlparse(url)
      if not url.hostname:
          raise ValueError('Invalid domain provided')
  
      # Strip www prefix any additional URL data
      url = urlparse('{scheme}://{host}'.format(scheme=url.scheme, host=url.hostname.lstrip('www.')))
      return url
docs: urlparse wrapper for user input
      @type   url:    str
      @rtype: urlparse.ParseResult