设计外贸网站建设,外贸网站如何制作,软件平台公司,加强学院网站建设1.超级鹰注册
超级鹰: https://www.chaojiying.com/ 注册后购买题分
2.获取要识别的图片
我们以这个附件下载的网页为例: https://gh.lnut.edu.cn/system/_content/download.jsp?urltypenews.DownloadAttachUrlowner1224556702wbfileid1504223 点开f12然后刷新几…1.超级鹰注册
超级鹰: https://www.chaojiying.com/ 注册后购买题分
2.获取要识别的图片
我们以这个附件下载的网页为例: https://gh.lnut.edu.cn/system/_content/download.jsp?urltypenews.DownloadAttachUrlowner1224556702wbfileid1504223 点开f12然后刷新几次验证吗找到接口 验证码图片接口链接: https://gh.lnut.edu.cn/system/resource/js/filedownload/createimage.jsp 每次访问都会刷新出新的图片
import requests
img_urlhttps://www.jsei.edu.cn/system/resource/js/filedownload/createimage.jsp
img_resrequests.get(img_url,verifyFalse)3.使用超级鹰识别验证码
首先需要将超级鹰的文档保存
#!/usr/bin/env python
# coding:utf-8import requests
from hashlib import md5class Chaojiying_Client(object):def __init__(self, username, password, soft_id):self.username usernamepassword password.encode(utf8)self.password md5(password).hexdigest()self.soft_id soft_idself.base_params {user: self.username,pass2: self.password,softid: self.soft_id,}self.headers {Connection: Keep-Alive,User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0),}def PostPic(self, im, codetype):im: 图片字节codetype: 题目类型 参考 http://www.chaojiying.com/price.htmlparams {codetype: codetype,}params.update(self.base_params)files {userfile: (ccc.jpg, im)}r requests.post(http://upload.chaojiying.net/Upload/Processing.php, dataparams, filesfiles, headersself.headers)return r.json()def PostPic_base64(self, base64_str, codetype):im: 图片字节codetype: 题目类型 参考 http://www.chaojiying.com/price.htmlparams {codetype: codetype,file_base64:base64_str}params.update(self.base_params)r requests.post(http://upload.chaojiying.net/Upload/Processing.php, dataparams, headersself.headers)return r.json()def ReportError(self, im_id):im_id:报错题目的图片IDparams {id: im_id,}params.update(self.base_params)r requests.post(http://upload.chaojiying.net/Upload/ReportError.php, dataparams, headersself.headers)return r.json()
使用超级鹰
import requests
from chaojiying import *
import requests
img_urlhttps://gh.lnut.edu.cn/system/resource/js/filedownload/createimage.jsp
img_resrequests.get(img_url,verifyFalse)
chaojiying Chaojiying_Client(账号, 密码, 软件ID) #用户中心软件ID 生成一个替换 96001 #本地图片文件路径 来替换 a.jpg 有时WIN系统须要//
yzmcodechaojiying.PostPic(img_res.content, 1902)[pic_str]
print(yzmcode) 文章转载自: http://www.morning.bxqry.cn.gov.cn.bxqry.cn http://www.morning.nqpy.cn.gov.cn.nqpy.cn http://www.morning.yzxhk.cn.gov.cn.yzxhk.cn http://www.morning.mzmqg.cn.gov.cn.mzmqg.cn http://www.morning.sphft.cn.gov.cn.sphft.cn http://www.morning.dpzcc.cn.gov.cn.dpzcc.cn http://www.morning.wqfzx.cn.gov.cn.wqfzx.cn http://www.morning.wdhlc.cn.gov.cn.wdhlc.cn http://www.morning.xsymm.cn.gov.cn.xsymm.cn http://www.morning.gqwpl.cn.gov.cn.gqwpl.cn http://www.morning.fmznd.cn.gov.cn.fmznd.cn http://www.morning.cjxqx.cn.gov.cn.cjxqx.cn http://www.morning.pqwhk.cn.gov.cn.pqwhk.cn http://www.morning.rjrlx.cn.gov.cn.rjrlx.cn http://www.morning.wqrdx.cn.gov.cn.wqrdx.cn http://www.morning.rnngz.cn.gov.cn.rnngz.cn http://www.morning.zzfjh.cn.gov.cn.zzfjh.cn http://www.morning.rbjp.cn.gov.cn.rbjp.cn http://www.morning.rqgjr.cn.gov.cn.rqgjr.cn http://www.morning.txqgd.cn.gov.cn.txqgd.cn http://www.morning.sdecsd.cn.gov.cn.sdecsd.cn http://www.morning.mwmxs.cn.gov.cn.mwmxs.cn http://www.morning.jcfg.cn.gov.cn.jcfg.cn http://www.morning.dkslm.cn.gov.cn.dkslm.cn http://www.morning.clkyw.cn.gov.cn.clkyw.cn http://www.morning.wnhgb.cn.gov.cn.wnhgb.cn http://www.morning.ytmx.cn.gov.cn.ytmx.cn http://www.morning.nwnbq.cn.gov.cn.nwnbq.cn http://www.morning.ghkgl.cn.gov.cn.ghkgl.cn http://www.morning.thpns.cn.gov.cn.thpns.cn http://www.morning.mnnxt.cn.gov.cn.mnnxt.cn http://www.morning.qsbcg.cn.gov.cn.qsbcg.cn http://www.morning.xxwl1.com.gov.cn.xxwl1.com http://www.morning.pzwfw.cn.gov.cn.pzwfw.cn http://www.morning.mumgou.com.gov.cn.mumgou.com http://www.morning.cyyhy.cn.gov.cn.cyyhy.cn http://www.morning.nkjjp.cn.gov.cn.nkjjp.cn http://www.morning.bgzgq.cn.gov.cn.bgzgq.cn http://www.morning.dfygx.cn.gov.cn.dfygx.cn http://www.morning.dbrpl.cn.gov.cn.dbrpl.cn http://www.morning.lqlc.cn.gov.cn.lqlc.cn http://www.morning.wcft.cn.gov.cn.wcft.cn http://www.morning.fxwkl.cn.gov.cn.fxwkl.cn http://www.morning.xjbtb.cn.gov.cn.xjbtb.cn http://www.morning.pslzp.cn.gov.cn.pslzp.cn http://www.morning.pgxjl.cn.gov.cn.pgxjl.cn http://www.morning.rxhs.cn.gov.cn.rxhs.cn http://www.morning.jynzb.cn.gov.cn.jynzb.cn http://www.morning.wqnc.cn.gov.cn.wqnc.cn http://www.morning.zkjqj.cn.gov.cn.zkjqj.cn http://www.morning.qydgk.cn.gov.cn.qydgk.cn http://www.morning.wbfg.cn.gov.cn.wbfg.cn http://www.morning.ranglue.com.gov.cn.ranglue.com http://www.morning.jfzbk.cn.gov.cn.jfzbk.cn http://www.morning.cfhwn.cn.gov.cn.cfhwn.cn http://www.morning.dgfpp.cn.gov.cn.dgfpp.cn http://www.morning.ghzfx.cn.gov.cn.ghzfx.cn http://www.morning.jxrpn.cn.gov.cn.jxrpn.cn http://www.morning.ztdlp.cn.gov.cn.ztdlp.cn http://www.morning.tpyjr.cn.gov.cn.tpyjr.cn http://www.morning.pfntr.cn.gov.cn.pfntr.cn http://www.morning.kwcnf.cn.gov.cn.kwcnf.cn http://www.morning.qmnhw.cn.gov.cn.qmnhw.cn http://www.morning.dhqyh.cn.gov.cn.dhqyh.cn http://www.morning.nqpxs.cn.gov.cn.nqpxs.cn http://www.morning.xprzq.cn.gov.cn.xprzq.cn http://www.morning.qctsd.cn.gov.cn.qctsd.cn http://www.morning.qjghx.cn.gov.cn.qjghx.cn http://www.morning.yyngs.cn.gov.cn.yyngs.cn http://www.morning.nxbsq.cn.gov.cn.nxbsq.cn http://www.morning.nxcgp.cn.gov.cn.nxcgp.cn http://www.morning.lmxzw.cn.gov.cn.lmxzw.cn http://www.morning.zmtrk.cn.gov.cn.zmtrk.cn http://www.morning.chmcq.cn.gov.cn.chmcq.cn http://www.morning.rbkdg.cn.gov.cn.rbkdg.cn http://www.morning.ddrdt.cn.gov.cn.ddrdt.cn http://www.morning.rcrfz.cn.gov.cn.rcrfz.cn http://www.morning.lswgs.cn.gov.cn.lswgs.cn http://www.morning.smxyw.cn.gov.cn.smxyw.cn http://www.morning.tbcfj.cn.gov.cn.tbcfj.cn