http://phecoopkj4ytf3fokcfvykymg7zuhkwsoqbh5dgnwwee423delgexyqd.onion/page-2009091635-Lowercase-URL-Encoding-with-Urllib-in-Python3-Python3.html
This little wrapper function allows you to do a lowercase url-encode Snippet import re
import urllib.parse
def quote_url_lower(url,safe='/'):
s=urllib.parse.quote(url,safe)
pattern = " %[A-Z,0-9][A-Z,0-9] " # Convert the result to a set so each entry is unique
result = set(re.findall(pattern,s))
for r in result:
s = s.replace(r,r.lower())
return s Usage Example print(quote_url_lower( " abcdef/ghi/123+= " ))
abcdef/ghi/123%2b%3d
print(quote_url_lower( " abcdef/ghi/123+= "...