code: def get_proxy_parts(proxy):
      
      proxy_parts = {'schema': None,
                     'user': None,
                     'password': None,
                     'host': None,
                     'port': None,
                     }
      # Find parts
      results = re.match(proxy_parts_pattern, proxy)
      if results:
          matched = results.groupdict()
          for key in proxy_parts:
              proxy_parts[key] = matched.get(key)
  
      else:
          logger.error("Invalid proxy format `{proxy}`".format(proxy=proxy))
  
      if proxy_parts['port'] is None:
          proxy_parts['port'] = '80'
  
      return proxy_parts
docs: Take a proxy url and break it up to its parts