git链接: https://github.com/JOUUUSKA/spider_toolsbox
这里写目录标题
- 一.识别验证码
- 1、识别英文+数字验证码
- 2、识别滑块验证码
- 3、识别点选验证码
一.识别验证码
git链接: https://github.com/JOUUUSKA/spider_toolsbox
创作不易记得stars
1、识别英文+数字验证码
from spider_toolsbox.spidertools import SpiderTools
spidertool = SpiderTools()
spidertool.ocr_img(img_path)
返回给图片中显示的验证码
2、识别滑块验证码
一张图为带坑位的原图,如下图
一张图为原图,如下图
from spider_toolsbox.spidertools import SpiderTools
spidertool = SpiderTools()
spidertool.ocr_slide_with_hole(bgimg_path, fullpage_path)
返回图片中显示的滑块图缺口坐标
小滑块为单独的png图片,背景是透明图,如下图
然后背景为带小滑块坑位的,如下图
from spider_toolsbox.spidertools import SpiderTools
spidertool = SpiderTools()
spidertool.ocr_slide_with_clean(bgimg_path, fullpage_path)
3、识别点选验证码
from spider_toolsbox.spidertools import SpiderTools
spidertool = SpiderTools()
spidertool.ocr_click_choose(test_img_path, result_img_path)
git链接: https://github.com/JOUUUSKA/spider_toolsbox
本文所有资源由JOUUUSKA提供
git主页: https://github.com/JOUUUSKA