def _clean_url(url):
 url = url.encode('utf8')
 url = ''.join(((urllib.quote(c) if (ord(c) >= 127) else c) for c in url))
 return url

def _clean_url ( url ) : url = url . encode ( 'utf8' ) url = '' . join ( ( ( urllib . quote ( c ) if ( ord ( c ) >= 127 ) else c ) for c in url ) ) return url
remove all parameters from a url .