【爬虫】(三)爬虫之处理简单验证码

可处理简单的数字验证码。
例如:

1
2
3
4
5
import pytesseract
from PIL import Image
image = Image.open('vcode.gif')
vcode = pytesseract.image_to_string(image)
print(vcode)

结果:

对于复杂的字母等不可识别。

谢谢你请我吃糖果!