"Wget命令中的--no-check-certificate选项“Post”失败:证书主机名不匹配"

2024-09-30 18:12:38 发布

您现在位置:Python中文网/ 问答频道 /正文

我在Windows>;visualstudio>;Python上运行,并在代码中使用WGET。在

我正在尝试调用API(Post)。在

代码如下:

APIWGET = [WGETInstallationFolder,'--no-check-certificate',"--post-data="% PostFile,"--output-file="+TempReadWritePath + 'TempReadWriteFile' + TimeNow + '.txt',"--wait=2","--content-on-error","--header="+Header, "--output-document="+TempReadWritePath + 'TempReadWriteFile' + TimeNow + '.txt',"--timeout=3","--tries=3", "--save-headers", "https://" +APIGWIP +"xxxxxxxx/"]  

call(APIWGET)

并且获取证书的公用名不匹配。。在

提到当我用“GET”调用同一个API时,一切正常。在


Tags: no代码gttxtapioutputwindowswget