Socket
Book a DemoInstallSign in
Socket

@1conan/anti-captcha

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@1conan/anti-captcha

anti-captcha api client

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
5
25%
Maintainers
1
Weekly downloads
 
Created
Source

anti-captcha

API wrapper for Anti Captcha

Example

import { AntiCaptcha, RecaptchaV2ProxylessResult, TaskType } from '@1conan/anti-captcha';

const ac = new AntiCaptcha('<insert clientKey>');

(async () => {
  const balance = await ac.getBalance();
  console.log(`Balance: ${balance}`);

  const taskId = await ac.createTask({
    type: TaskType.RecaptchaV2Proxyless,
    websiteURL: 'https://example.com',
    websiteKey: '<insert recaptcha public key>',
    isInvisible: true,
  });
  console.log(`Task ID: ${taskId}`);

  const result = await ac.getTaskResult<RecaptchaV2ProxylessResult>(taskId);

  const solvingTime = (result.solvedAt.getTime() - result.createdAt.getTime()) / 1000;

  console.log(`Cost: US$${result.cost}`);
  console.log(`Solving Time: ${solvingTime.toFixed(2)} seconds`);
  console.log(`Result: ${result.gRecaptchaResponse}`);
})();
const { AntiCaptcha, TaskType } = require('@1conan/anti-captcha');

const ac = new AntiCaptcha('<insert clientKey>');

(async () => {
  const balance = await ac.getBalance();
  console.log(`Balance: ${balance}`);

  const taskId = await ac.createTask({
    type: TaskType.RecaptchaV2Proxyless,
    websiteURL: 'https://example.com',
    websiteKey: '<insert recaptcha public key>',
    isInvisible: true,
  });
  console.log(`Task ID: ${taskId}`);

  const result = await ac.getTaskResult(taskId);

  const solvingTime = (result.solvedAt.getTime() - result.createdAt.getTime()) / 1000;

  console.log(`Cost: US$${result.cost}`);
  console.log(`Solving Time: ${solvingTime.toFixed(2)} seconds`);
  console.log(`Result: ${result.gRecaptchaResponse}`);
})();

Keywords

anti-captcha

FAQs

Package last updated on 03 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts