返回

python-使用PyteSeract解决验证码后的空白输出?

发布时间:2022-03-10 12:31:19 378
# node.js

我正在尝试破解验证码:

captcha image

并运行脚本:

from PIL import Image
from pytesseract import pytesseract

path_to_tesseract = r"/usr/local/Cellar/tesseract/5.0.1/bin/tesseract"
image_path2 = r"captcha2.jpg"
img = Image.open(image_path2)
pytesseract.tesseract_cmd = path_to_tesseract
text = pytesseract.image_to_string(img)
print(text[:-1])
captchaText=text[:-1]

但输出为空,当我使用带有以下验证码的相同脚本时:

second captcha

效果很好。

特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报
评论区(0)
按点赞数排序
用户头像