0.1.1 • Published 7 years ago

antigate2 v0.1.1

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

antigate2

Antigate client

NPM version Build Status Dependency Status Coverage percentage experimental

Install

npm install antigate2 --save

Usage

import { Antigate } from "antigate2";

const antigate = new Antigate({ key : "KEY" });

async function getByImage(){
    const text = await antigate.getByBase64("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ....");
    console.log(text);
}
async function getNoCaptcha(){
    const solution = await antigate.getNoCaptcha("http://http.myjino.ru/recaptcha/test-get.php", "6Lc_aCMTAAAAABx7u2W0WPXnVbI_v6ZdbM6rYf16");
    console.log(solution.gRecaptchaResponse);
}
getByImage();
getNoCaptcha();

API

public async getByBase64(data: string): Promise<string>
public async getNoCaptcha(websiteURL: string, websiteKey: string) : INoCaptchaSolution;

export interface INoCaptchaSolution {
    gRecaptchaResponse: string; // Хеш который необходимо подставить в форму с рекапчей в <textarea id="g-recaptcha-response" ..></textarea> . Имеет длину от 500 до 2190 байт.
    gRecaptchaResponseMD5: string; // Контрольная сумма gRecaptchaResponse в MD5. Передается только если добавить параметр isExtended со    значением true в методе getTaskResult. Сделано исключительно для отладки, чтобы разработчик мог убедиться что получает хэш целиком.
}

Test

npm install
npm test
0.1.1

7 years ago

0.1.0

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago