我想尝试阅读简单的图像但我有以下错误:
getMinvalueString(start, maxEnd, minEnd, Arrays.copyOf(num,num.length));
getMaxvalueString(start, maxEnd, minEnd, Arrays.copyOf(num,num.length));
错误:
import requests
import pytesseract
from PIL import Image
from StringIO import StringIO
from lxml import html
session=requests.Session()
cont=session.get('http://This_site.com/').content
tree=html.fromstring(cont)
token=tree.xpath(...)
session_id=token.split(...)
response=session.get('http://This_site.com/'+session_id)
captcha=pytesseract.image_to_string(Image.open(StringIO(response.content)))
print captcha
答案 0 :(得分:0)
好像你没有安装tesseract-ocr
,如果您正在使用基于debian的发行版,请试试这个:
$ sudo apt-get install tesseract-ocr