https://github.com/chen86860/captcharecon
Base on Lianzhong CAPTCHA Recognition online Lianzhong using Node.js to break CAPTCHA.
https://github.com/chen86860/captcharecon
captcha captcha-recognition nodejs recognition
Last synced: about 1 year ago
JSON representation
Base on Lianzhong CAPTCHA Recognition online Lianzhong using Node.js to break CAPTCHA.
- Host: GitHub
- URL: https://github.com/chen86860/captcharecon
- Owner: chen86860
- License: mit
- Created: 2018-05-30T07:54:21.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-02T14:08:29.000Z (over 6 years ago)
- Last Synced: 2025-03-26T07:03:18.012Z (over 1 year ago)
- Topics: captcha, captcha-recognition, nodejs, recognition
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/captcha-rec
- Size: 31.3 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CAPTCHA Recognition using Node.js
> Base on Lianzhong CAPTCHA Recognition online [Lianzhong](https://www.jsdati.com/) using Node.js to break CAPTCHA.
## Requirements
This module requires a minimum of Node v6.9.0
## Getting Started
To begin, you'll need to install `captcha-rec`:
``` bash
npm i captcha-rec
// or yarn add captcha-rec
```
using in Node.js
``` javascript
const Captcha = require('captcha-rec')
const captcha = new Captcha({
username: '', // Lianzhong username, see below [Options](## Options)
password: '', // Lianzhong password, see below
type: '' // CAPTCHA type, see below
})
// 1.using local file
const fs = require('fs')
captcha.recon(fs.createReadStream('test.png')).then(result => {
console.log('recon result', result.value)
// report ID result.reportId
}).catch(err => {
console.error('err', err)
})
// 2. using remote images
captcha.recon('https://example.com/test.png').then(result => {
console.log('recon result', result.value)
// report ID result.reportId
}).catch(err => {
console.error('err', err)
})
```
## Options
- `username` Lianzhong username, you should register on the websites [Lianzhong](https://www.jsdati.com/)
- `password` Lianzhong password, you should register on the websites [Lianzhong](https://www.jsdati.com/)
- `type` CAPTCHA type, see [Type and Price](https://www.jsdati.com/docs/price)
## API
- captcha.recon(imgSrc, type)
- `imgSrc` image src or image eadStream
- `type` CAPTCHA type
- return ``
The main method to recognition the CAPTCHA.
- captcha.report(reportId)
- `reportId` CAPTCHA reportId
- return ``
If the recognition result no correct, you can report the result to the Lianzhong, help them to correction the result.