qiaoer1993

1.通过肉眼识别,然后输入到input里面

from PIL import image Image

request.urlretrieve(url,\'image\')  #下载验证码图片

image = Image.open(\'image\')  #程序内部打开图片

image.show()  #将图片显示出来

captch = input("请输入验证码")  #输入你看到的验证码

2.通过阿里云里面的付费识别:https://market.aliyun.com/products/57124001/cmapi031940.html?spm=5176.730005.productlist.d_cmapi031940.46da3524VkSlar&innerSource=search_%E6%99%BA%E8%83%BD%E5%9B%BE%E5%83%8F%E6%8A%80%E6%9C%AF#sku=yuncode2594000001   #自动识别豆瓣网图形验证码

3.使用谷歌的开源库tesseract,但是识别率比较低

import pytesseract
from PIL import Image

pytesseract.pytesseract.tesseract_cmd = r"D:\Tesseract-OCR\tesseract.exe"
image = Image.open("c.PNG")
text = pytesseract.image_to_string(image,lang=\'chi_sim\')
print(text)

分类:

技术点:

相关文章:

  • 2021-11-14
  • 2022-01-10
  • 2021-11-21
  • 2021-11-06
  • 2022-02-19
  • 2022-12-23
  • 2022-01-16
猜你喜欢
  • 2022-01-06
  • 2021-12-30
  • 2021-11-01
  • 2022-01-18
  • 2022-02-10
  • 2022-12-23
  • 2022-01-03
相关资源
相似解决方案