发生异常:
Traceback (most recent call last):
requests.exceptions.SSLError: HTTPSConnectionPool(host='fanyi.baidu.com', port=443): Max retries exceeded with url: /basetrans (Caused by SSLError(SSLError(1, '[SSL: BAD_SIGNATURE] bad signature (_ssl.c:1076)')))
解决SSL 根证书验错误:
在请求post时添加:verify=False
response= requests.post(url,data=data,headers=self.headers,verify=False)