diff --git a/README.md b/README.md index ee1fdf1..bf6a15a 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,22 @@ # Silder Captcha Recognition Helper for [Cea][cea] +No need for the original image, `@ceajs/slider-captch` will get the slider target position by processing the slider background image [status: WIP] + # Demo ![demo gif](./demo.gif) # Recognition Trustworthiness -Playwright test result: +Playwright test result(Tested by simulating the unified login of [hqu University][hqu]): ```bash > npx playwright test Running 1000 tests using 4 workers ... - 728 passed (49m) + 837 passed (26m) ``` [cea]: https://github.com/ceajs/cea/issues/25 +[hqu]: https://hqu.campusphere.net/portal/login diff --git a/src/index.js b/src/index.js index 217073a..dd73d8b 100644 --- a/src/index.js +++ b/src/index.js @@ -69,23 +69,23 @@ export async function findMovePercent( const matchOriginPoint = contours.get(0).data32S movePercent = matchOriginPoint[0] / captchaImg.getWidth() - printRec(test, dstTempl, matchOriginPoint) + // printRec(test, dstTempl, matchOriginPoint) } else { console.error( `Error: Recognizing slider ${n ?? 'test'}` ) } - new Jimp({ - width: test.cols, - height: test.rows, - data: Buffer.from(test.data), - }).write( - path.join( - __dirname, - `../processed-img/${n ?? 'test'}.png` - ) - ) + // new Jimp({ + // width: test.cols, + // height: test.rows, + // data: Buffer.from(test.data), + // }).write( + // path.join( + // __dirname, + // `../processed-img/${n ?? 'test'}.png` + // ) + // ) return movePercent }