def _is_url_naive(urlstr):
 url = qurl_from_user_input(urlstr)
 assert url.isValid()
 if (not utils.raises(ValueError, ipaddress.ip_address, urlstr)):
  return True
 if (not QHostAddress(urlstr).isNull()):
  return False
 host = url.host()
 return (('.' in host) and (not host.endswith('.')))

def _is_url_naive ( urlstr ) : url = qurl_from_user_input ( urlstr ) assert url . isValid ( ) if ( not utils . raises ( ValueError , ipaddress . ip_address , urlstr ) ) : return True if ( not QHostAddress ( urlstr ) . isNull ( ) ) : return False host = url . host ( ) return ( ( '.' in host ) and ( not host . endswith ( '.' ) ) )
naive check if given url is really a url .