def use_filter(filter, url, input):
    """Apply a filter function to input from an URL"""
    output = filter(url, input)

    if output is None:
        # If the filter does not return a value, it is
        # assumed that the input does not need filtering.
        # In this case, we simply return the input.
        return input

    return output