只需要在请求代码中加入verify = False认证就可以实现
#使用python代码发生https请求 import requests requests.packages.urllib3.disable_warnings()#忽略警告 def login(inData): url="https://www.imooc.com/passport/user/prelogin" payload = inData resp = requests.post(url,data=payload,verify = False)#verify = False关闭认证 print(resp.text) login({"username":"tiger","password":"123456"})