def clean_url(url):
    """Remove extraneous characters from URL.

    Params:
    - url: (type: string) URL to clean.

    Returns:
    - url: (type: string) clean URL.
    """

    if url is None:
        return None

    if '??' in url:
        url = url.split('??')[0]

    if url.endswith('?'):
        url = url[:-1]

    if '`' in url:
        url = url.replace('`', '')

    return url