ShowAPI识别验证码

版权声明:转载请注明出处 https://blog.csdn.net/GG9527li/article/details/85927941

ShowAPI识别验证码

首先官网上有些代码需要我们修改
在这里插入图片描述
需要将img改为image否则会出现如下报错:
在这里插入图片描述
其次我们需要将URL 后面的184-5改为184-4
最后就是我们执行成功的代码:

#coding=utf-8
import requests
from coderecognize.ShowapiRequest import ShowapiRequest



r = ShowapiRequest("http://route.showapi.com/184-4","85060","624075410c1f4901b124f1110b93b90e" )
r.addBodyPara("img_base64", "")
r.addBodyPara("typeId", "34")
r.addBodyPara("convert_to_jpg", "0")
r.addBodyPara("needMorePrecise", "0")
r.addFilePara("imge", r"D://code1.png") #文件上传时设置
res = r.post()
print(res.text) # 返回信息

返回值为:在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/GG9527li/article/details/85927941
今日推荐