示例
href="/authors/Default.aspx?p=1&c=%e4%b8%a4%e6%b1%89"
解码后:
href="/authors/Default.aspx?p=1&c=两汉"
解决方法
import urllib
print(urllib.request.unquote("/authors/Default.aspx?p=1&c=%e4%b8%a4%e6%b1%89"))
结果
/authors/Default.aspx?p=1&c=两汉
2024-03-13 22:09:21
href="/authors/Default.aspx?p=1&c=%e4%b8%a4%e6%b1%89"
解码后:
href="/authors/Default.aspx?p=1&c=两汉"
import urllib
print(urllib.request.unquote("/authors/Default.aspx?p=1&c=%e4%b8%a4%e6%b1%89"))
/authors/Default.aspx?p=1&c=两汉