Python
2的urllib.quote_plus和Python
3的urllib.parse.quote_plus
url = "http://earth.google.com/gallery/kmz/women_for_women.kmz?a=large"# Python 2urllib.quote_plus(url)# Python 3urllib.parse.quote_plus(url)
输出:
'http%3A%2F%2Fearth.google.com%2Fgallery%2Fkmz%2Fwomen_for_women.kmz%3Fa%3Dlarge'
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)