利用pytesseract和tesseract实现验证码的识别

  • 下载tesseract
https://digi.bib.uni-mannheim.de/tesseract/
  • 安装tesseract,并将软件的安装目录添加到系统的环境变量中

利用pytesseract和tesseract实现验证码的识别_第1张图片

  • 利用pip工具安装pytesseract
pip install pytesseract
  • 如果在运行pytesseract的过程中出现错误:无法找到tesseract,则可以通过下列方式进行解决:

打开pytesseract.py文件,将其中的“tesseract_cmd”字段指定为tesseract.exe的完整路径

参考网址:

https://blog.csdn.net/weixin_41635857/article/details/80692909

https://www.cnblogs.com/zhangxinqi/p/9297292.html#_label6

你可能感兴趣的:(python爬虫)