验证码调用ShowapiRequest报错
#解析图片获取验证码
def code_online(self,file_name):
self.get_code_image(file_name)
r = ShowapiRequest(“http://route.showapi.com/184-5",“89161”,"a7c4d68acc8244ec8a3de80388c64dd8” )
r.addBodyPara(“img_base64”, “”)
r.addBodyPara(“typeId”, “35”)
r.addBodyPara(“convert_to_jpg”, “0”)
r.addBodyPara(“needMorePrecise”, “0”)
r.addFilePara(“image”, file_name) #文件上传时设置
res = r.post()
print(res.text)
text = res.json()[‘showapi_res_body’][‘Result’]
return text