一.取消警告方法
1.放在py文件最上面如图
import warnings
warnings.filterwarnings("ignore")
二. requests 可以传的参数
1.session = HTMLSession()
2.session = Session()
response = session.get(url, params=params, headers=headers, proxies=proxies, verify=False,timeout=5)
response = requests.post(url, params=params, headers=headers, proxies=proxies, verify=False,timeout=5)
三. Response 返回值 Unicode 转 utf-8
result = response.content.decode("gbk")
result = price_response.content.decode("utf-8"))
result = response.encode('utf-8').decode('unicode_escape')