dart_anticaptcha 1.0.6 copy "dart_anticaptcha: ^1.0.6" to clipboard
dart_anticaptcha: ^1.0.6 copied to clipboard

retractedoutdated

A simple command-line application.

The solution of the captcha is carried out at the expense of the resource workers - https://anti-captcha.com To solve the captcha, you need to register on the resource and top up your balance. Documentation - https://anti-captcha.com/apidoc

Installation #

`sh dart pub add dart_anticaptcha,

or

`sh dependencies: dart_anticaptcha: ^ 1.0.6,

Usage #

The easiest way to use this library is to use the memoryImageToBase64() function. This function is intended for converting an image to base64 and further uploading it to the resource to solve the captcha. Also, to get base64 images from the site, you need to use the networkImageToBase64() function.

import 'package:dart_anticaptcha/dart_anticaptcha.dart';

void main() async {
  String anticaptcha_token = 'YOUR_TOKEN';
  String memoryImage = 'captcha.jpeg';
  String networkImage = 'https://api.vk.com/captcha.php?sid=605143621908&s=1';

  AntiCaptcha anticaptcha = AntiCaptcha(anticaptcha_token);

  String? imgbase64 = await anticaptcha
      .networkImageToBase64(networkImage); //memoryImage or networkImage
      
  Map headers = {
    "clientKey": anticaptcha_token,
    "task": {"type": "ImageToTextTask", "body": imgbase64}
  };
  dynamic result = await anticaptcha.returnResult(headers, imgbase64!);
  print(result);
}

6
likes
0
points
537
downloads

Publisher

unverified uploader

Weekly Downloads

A simple command-line application.

Homepage

License

unknown (license)

Dependencies

http

More

Packages that depend on dart_anticaptcha