<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean_url(url, replacement='_'):
 """ Cleans the url for protocol prefix and trailing slash and replaces special characters with the given replacement. :param url: The url of the request. :param replacement: A string that is used to replace special characters. """

        cleaned = re.sub(r'/$', '', re.sub(r'https?://', '', url))
        for character in '/ _ ? & : ; %'.split():
            cleaned = cleaned.replace(character, replacement)
        return cleaned