试用了阿里云市场的验证码识别api,真的牛批,传统4位数验证码识别率超高

29 篇文章 0 订阅
1 篇文章 0 订阅

有钱是真的可以为所欲为

 

以后阿里云的api平台的确可以占有部分市场

验证码:

引入base64模块,识别后,传入此api

 

host = 'https://a************.showapi.com'
path = '/checkcode'
method = 'POST'
appcode = '***************************'
querys = ''
bodys = {}
url = host + path


bodys['convert_to_jpg'] = '0'
bodys['img_base64'] =ls_f
bodys['typeId'] = '14'
post_data = urllib.urlencode(bodys)
request = urllib2.Request(url, post_data)
request.add_header('Authorization', 'APPCODE ' + appcode)
#根据API的要求,定义相对应的Content-Type
request.add_header('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
response = urllib2.urlopen(request, context=ctx)
content = response.read()
if (content):
    print(content)
输出结果:

 {"showapi_res_code":0,"showapi_res_error":"","showapi_res_body":{"Result":"8028","ret_code":0,"Id":"4a0909f1-019c-4cb5-834e-15a4e97fd32c"}}

2019年重新看了下,阿里云api市场上大多数验证码识别已经下架,但思路可用于调用各大平台的api

 

 

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值