encodeURIComponent
from urllib import parse
#这个是js的结果
# encodeURIComponent('人生苦短')
# "%E4%BA%BA%E7%94%9F%E8%8B%A6%E7%9F%AD"
sentence='%E4%B8%AD%E5%9B%BD'
print(parse.unquote(sentence)) #解码输出:人生苦短
2021-12-05 01:21:37
encodeURIComponent
from urllib import parse
#这个是js的结果
# encodeURIComponent('人生苦短')
# "%E4%BA%BA%E7%94%9F%E8%8B%A6%E7%9F%AD"
sentence='%E4%B8%AD%E5%9B%BD'
print(parse.unquote(sentence)) #解码输出:人生苦短