def add_query_params(url, params):
url_parts = list(urlparse.urlparse(url))<EOL>query = dict(urlparse.parse_qsl(url_parts[<NUM_LIT:4>]))<EOL>query.update(params)<EOL>url_parts[<NUM_LIT:4>] = urllib.urlencode(query)<EOL>return urlparse.urlunparse(url_parts)<EOL>
Add query params to a URL