python爬虫虫虫

Python爬虫教程:验证码识别

2019-08-17  本文已影响54人  c067527d47c2
'''
遇到不懂的问题?Python学习交流群:821460695满足你的需求,资料都已经上传群文件,可以自行下载!
'''

爬虫-验证码识别

通用方法案例

Tesseract-Windows的安装

Tesseract-macOS的安装

Tesseract-Linux的安装

python使用tesseract的工具 pytesseract 的安装

识别验证码案例

import pytesseract as pt

from PIL import Image

# 生成图片实例
image = Image.open('timg.jpg')

# 调用 pytesseract 识别图片文字
text = pt.image_to_string(image)

print(text)

运行结果

上一篇 下一篇

猜你喜欢

热点阅读