def _is_url(url):
 try:
  return (parse_url(url).scheme in _VALID_URLS)
 except:
  return False

def _is_url ( url ) : try : return ( parse_url ( url ) . scheme in _VALID_URLS ) except : return False
check to see if a url has a valid protocol .