2.0.0 • Published 4 years ago

jw-rec v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

JW-REC

Auto recognize hnust jw verify code

Example

jwRec.getVcodeAndCookie()

const jwRec = require('jw-rec')

async function test1() {
    let loginVerifyCode = await jwRec.getVcodeAndCookie()
    console.log(loginVerifyCode)
    // Object:{ vcode: 'zzn2',cookie: 'JSESSIONID=6EBBBDD001C7FC3CECD3018761FE922D' }
}

jwRec.recognize(buf,type)

const request = require('request')
const jwRec = require('jw-rec')

async function test2() {
    request({ url: 'http://kdjw.hnust.cn/kdjw/verifycode.servlet', encoding: null, }, async (err, res, body) => {
        // TODO: handle error
        const buf = Buffer.from(res.body, 'binary')
        let vcode = await jwRec.recognize(buf, 'image/jpeg')
        console.log(vcode)
        // String:3c1z
    })
}
1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.3

4 years ago

2.0.0

4 years ago

1.1.2

4 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago