def quote_query(string):
 parsed = urlparse(string)
 string = string.replace(parsed.query, quote(parsed.query, u'/=&'), 1)
 return string

def quote_query ( string ) : parsed = urlparse ( string ) string = string . replace ( parsed . query , quote ( parsed . query , u'/=&' ) , 1 ) return string
quotes the query parameters .