mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Use new url_normalize library, preserving old just in case anything changes.
This commit is contained in:
parent
4ee5525d71
commit
104d50ff46
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue