docs: def __isValidUrl(self, addr):
          """Check if the UrlAddr is in a valid format, for example::
  
              http://ip:port
              https://abc.com
          """
          regex = re.compile(
              r'^(?:http)s?://'  #: http:// or https://
              r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|'  #: domain...
              r'localhost|'  #: localhost...
              r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})'  #: ...or ip
              r'(?::\d+)?'  #: optional port
              r'(?:/?|[/?]\S+)$', re.IGNORECASE)
          if addr and isinstance(addr, string_types):
              if regex.match(addr):
                  return True
          return False