#NEWLINE# def stripQueryString( url ) : #NEWLINE# #INDENT# url_parts = url . split ( '/' ) #NEWLINE# url_parts [ ( - 1 ) ] = re . sub ( '\\?.*$' , '' , url_parts [ ( - 1 ) ] ) #NEWLINE# cleanUrl = '/' . join ( url_parts ) #NEWLINE# if ( url != cleanUrl ) : #NEWLINE# #INDENT# url_to_originalUrl [ cleanUrl ] = url #NEWLINE# #UNINDENT# return cleanUrl