#NEWLINE# def normalize_url( self , url , charset = 'utf-8' ) : #NEWLINE# #INDENT# url = encode ( url , charset , 'ignore' ) #NEWLINE# ( scheme , netloc , path , qs , anchor ) = urlsplit ( url ) #NEWLINE# path = encode ( path , anchor , 'ignore' ) #NEWLINE# path = quote ( path , '/%' ) #NEWLINE# qs = quote_plus ( qs , ':&%=' ) #NEWLINE# return urlparse . urlunsplit ( ( scheme , netloc , path , qs , anchor ) )