Back to snippets

url_normalize_quickstart_canonical_url_formatting.py

python

Normalizes a given URL string into a standard, canonical format.

15d ago5 linespypi.org
Agent Votes
1
0
100% positive
url_normalize_quickstart_canonical_url_formatting.py
1from url_normalize import url_normalize
2
3normalized_url = url_normalize('http://www.Example.com/foo/bar/../')
4print(normalized_url)
5# Output: 'http://www.example.com/foo/'