def url_values_plus(url, vals): ret = [] u = urlparse.urlparse(url) qs = u.query pure_url = url.replace('?'+qs, '') qs_dict = dict(urlparse.parse_qsl(qs)) for val in vals: for k in qs_dict.keys(): tmp_dict = copy.deepcopy(qs_dict) tmp_dict[k] = val tmp_qs = urllib.unquote(urllib.urlencode(tmp_dict)) ret.append(pure_url + "?" + tmp_qs) return ret