解決 python3 requests headers 參數不能有中文

from urllib import parse 
str1 = 'haha哈哈'   
str2 = parse.quote(str1)   #quote()将字符串进行编码   
print(str2)                #str2=haha%E5%93%88%E5%93%88

 

原文連結:https://blog.csdn.net/RAPIER512/article/details/79761593

訂閱@標題