url-normalize
url-normalize copied to clipboard
Stripping/removing URL parameters
It's stripping url parameters
url = 'https://www.example.com/xx/path/slug-whatever?atag=1234de&utm_medium=affiliates&utm_source=whatever_5443de' print(url_normalize(url,sort_query_params=True))
https://www.example.com/xx/path/slug-whatever?atag=1234de&utm_medium=affiliates
print(url_normalize(url,sort_query_params=False))
https://www.example.com/xx/path/slug-whatever?atag=1234de&utm_medium=affiliates
url_normalize.py, line 58
url = re.sub(r"utm_source=[^&]+&?", "", url)
Why utm_source is stripped as 'unecessary data'?