Use new url_normalize library, preserving old just in case anything changes.

This commit is contained in:
Samuel Clay 2022-04-19 15:28:18 -04:00
parent 4ee5525d71
commit 104d50ff46

View file

@ -24,6 +24,7 @@ inspired by:
__license__ = "Python"
import re, unicodedata, urllib.parse
from url_normalize import url_normalize
from urllib.parse import quote, unquote
default_port = {
@ -40,6 +41,9 @@ default_port = {
}
def normalize(url):
return url_normalize(url)
def normalize__pilgrim(url):
"""Normalize a URL."""
if not isinstance(url, str):
return url