@captcha-libs/capguru
v1.0.0
Published
CapGuru NodeJS client, captcha recognition service
Downloads
6
Maintainers
Readme
CapGuru NodeJS captcha client - use CapGuru with ease
Docs: https://docs.cap.guru/en/
Register via this link
Installation
Via npm
npm i @captcha-libs/capguru
Usage
import { CapGuru, GenericPuzzleTask } from "@captcha-libs/capguru";
const capguruClient = new CapGuru({
baseUrl: "https://api3.cap.guru/", // base url for capguru, default = "https://api3.cap.guru/"
clientKey: "<YOUR_CLIENT_KEY>",
pollingInterval: 5000, // optional. Delay in milliseconds to fetch task result, default: 5000ms
timeout: 120_000 // optional. Max time in milliseconds to wait for settled task result, default: 120000ms,
});
const puzzleRequest = new GenericPuzzleTask({ body: "puzzle-image-in-base64" });
const puzzleSolution = await capguruClient.solve(puzzleRequest);
const {
request, // as-is solution from api, example: "coordinates:x=247,y=0"
solution // parsed solution added by this library, example: { x: 247, y: 0}
} = puzzleSolution;
//to get balance
const balance = await capguruClient.getBalance()
Parsed solution examples
Single coordinate
"coordinate:x=44,y=32" -> { x: 44, y: 32}
Multiple coordinates
"coordinates:x=99,y=196;x=197,y=148;x=144,y=47" -> [{x:99,y:196},{x:197,y:148},{x:144,y:47}]
Images
"5,8,4,1" -> [5, 8, 4, 1]
Token (parsed as-is)
"token" -> "token"
Currently supported task payloads
- Classification
- AmazonCarPathTask
- AmazonPuzzleTask
- BinanceGridTask
- BinancePuzzleTask
- BuxMoneyCoordinatesTask
- FunCaptchaGridTask
- GeeTestPuzzleTask
- GenericPuzzleTask - task for any puzzle
- HCaptchaCoordinatesTask
- HCaptchaGridTask
- ImageToTextTask
- LinkvertiseCoordinatesTask
- ReCaptchaGridTask
- SeoFastCoordinatesTask
- TikTokABCTask
- TikTokKolesoTask
- TikTokPuzzleTask
- WorldCashCoordinatesTask
- Token