编码问题,我是因为请求的url中带有中文字符有问题,用quote转一下
quote(url, safe=string.printable)
from urllib.parse import quote
a="天" url = "http://xxx.com/aaa.php?VMCode="+a url = quote(url, safe=string.printable) print(url)
编码问题,我是因为请求的url中带有中文字符有问题,用quote转一下
quote(url, safe=string.printable)
from urllib.parse import quote
a="天" url = "http://xxx.com/aaa.php?VMCode="+a url = quote(url, safe=string.printable) print(url)