1.请求cookies时,发现认证失败问题,报错如下:
requests.exceptions.SSLError: HTTPSConnectionPool(host=‘55.14.6.197’, port=28443): Max retries exceeded with url: /web/index.html (Caused by SSLError(SSLError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)’),))
查询后关键代码解决,即请求时,带上忽略认证相关报错信息:
verify=False
res = session.post(url=login_url, json=login_data, headers=login_header,verify=False)
请求成功。