netpi / baidu-ocr-api Goto Github PK
View Code? Open in Web Editor NEW:eyeglasses: Baidu OCR Api For Node.js
License: MIT License
:eyeglasses: Baidu OCR Api For Node.js
License: MIT License
你好,这个如何在移动平台使用?谢谢
body:
{ code: 'ServiceUnavailable',
message: 'Service or dependent service is unavailable.',
requestId: '9c2cf317-5f63-4384-884b-c6f58a427474' } } }
你们的example源码:
// 外部图片
ocr.scan({
url:'http://7pun4e.com1.z0.glb.clouddn.com/test.jpg',
type:'text',
}).then(function (result) {
return console.log(result)
}).catch(function (err) {
console.log('err', err);
})
返回错误log:
httpModule: [Object],
agentClass: [Object],
agent: [Object],
_started: true,
href: 'http://ocr.bj.baidubce.com/v1/recognize/text',
req: [Object],
ntick: true,
response: [Circular],
originalHost: 'ocr.bj.baidubce.com',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true },
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
read: [Function],
body:
{ code: 'ServiceUnavailable',
message: 'Service or dependent service is unavailable.',
requestId: '91143e58-eaed-4069-bf5b-b42f24d91f0c' } } }
否则install -g的时候还要单独install -g 一个request。另外推荐用superagent,比request轻量很多,原生支持promise
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.