deeppavlov/core/data/utils.py
def set_query_parameter(url, param_name, param_value):
    """Given a URL, set or replace a query parameter and return the modified URL.

    Args:
        url: a given  URL
        param_name: the parameter name to add
        param_value: the parameter value
    Returns:
        URL with the added parameter

    """
    scheme, netloc, path, query_string, fragment = urlsplit(url)
    query_params = parse_qs(query_string)

    query_params[param_name] = [param_value]
    new_query_string = urlencode(query_params, doseq=True)

    return urlunsplit((scheme, netloc, path, new_query_string, fragment))
def set_query_parameter(url, param_name, param_value):
    scheme, netloc, path, query_string, fragment = urlsplit(url)
    query_params = parse_qs(query_string)

    query_params[param_name] = [param_value]
    new_query_string = urlencode(query_params, doseq=True)

    return urlunsplit((scheme, netloc, path, new_query_string, fragment))
def set_query_parameter ( url , param_name , param_value ) : scheme , netloc , path , query_string , fragment = urlsplit ( url ) query_params = parse_qs ( query_string ) query_params [ param_name ] = [ param_value ] new_query_string = urlencode ( query_params , doseq = True ) return urlunsplit ( ( scheme , netloc , path , new_query_string , fragment ) )
Given a URL, set or replace a query parameter and return the modified URL.

    Args:
        url: a given  URL
        param_name: the parameter name to add
        param_value: the parameter value
    Returns:
        URL with the added parameter
Given a URL set or replace a query parameter and return the modified URL .