response 返回值 Unicode 转 utf-8

一.取消警告方法

1.放在py文件最上面如图

import warnings
warnings.filterwarnings("ignore")

二. Response 返回值 Unicode 转 utf-8

result = response.content.decode("gbk")
result = price_response.content.decode("utf-8"))
result = response.encode('utf-8').decode('unicode_escape')

猜你喜欢

转载自www.cnblogs.com/gqv2009/p/12530512.html