code: def urlsplit(name):
      
  
      if not (isinstance(name, string_types)):
          name = str(name)
  
      if not name.startswith(('http://', 'https://')):
          name = 'http://' + name
  
      rv = urlparse(name)
      if rv.scheme == 'https' and rv.port is None:
          return rv.netloc, 443, True
      return rv.netloc.rsplit(':')[0], rv.port or 80, rv.scheme == 'https'
docs: Parse :param:`name` into (netloc, port, ssl)