而后填入代码中的4-6行中python
from aip import AipOcrcode
import reblog
# -*- coding: utf-8 -*- """ Created on Wed Apr 24 10:58:40 2019 @author: lenovn """ from aip import AipOcr import re APP_ID = '你的APP_ID' API_KEY = '你的API_KEY' SECRET_KEY = '你的SECRET_KEY' client = AipOcr(APP_ID,API_KEY,SECRET_KEY) i = open(r'E:\picture\shibie2.jpg','rb') #print(i) img = i.read() message = client.basicGeneral(img) #输出识别图片中文字的列表 print(message.get('words_result')) #只输出图中的文字: for i in message.get('words_result'): print(i.get('words'))