requests.content返回byte中的中文显示unicode码,如:‘\u53eb\u6211’,需进行反编码后得到其对应的汉字。
r.content.decode('unicode-escape')
#如:
f='\u4f18\u8863\u5e93\u4fc3\u9500'
print f
print(f.decode('unicode-escape'))
更多推荐
python requests.content 返回的unicode转为中文显示
发布评论