NAME
WebService::Antigate::V2 - Recognition of captches using antigate.com service (now anti-captcha.com) through API v2
SYNOPSIS
# you can use it directly
use WebService::Antigate::V2;
my $recognizer = WebService::Antigate::V2->new(key => "...");
$recognizer->upload_and_recognize(...);
# or via base class
use WebService::Antigate;
my $recognizer = WebService::Antigate->new(key => "...", api_version => 2);
$recognizer->upload_and_recognize(...);
DESCRIPTION
This is subclass of WebService::Antigate which implements version 2 of API. API documentation available at https://anticaptcha.atlassian.net/wiki/spaces/API/pages/196635/Documentation+in+English
METHODS
This class has all methods described in WebService::Antigate. Specific changes listed below.
- WebService::Antigate::V2->new( %options )
-
Constructor changes some options defaults:
KEY DEFAULT OPTIONAL ----------- -------------------- --------------- scheme https yes subdomain api. yes
For other options see WebService::Antigate
- $recognizer->try_upload(%options)
-
API v2 accepts several types of captcha. For now it is: captcha image, recaptcha, funcaptcha. Each type has specific options which may be passed to this method: https://anticaptcha.atlassian.net/wiki/spaces/API/pages/5079084/Captcha+Task+Types
Also some common options available, like
softId
andlanguagePool
, which also may be passed: https://anticaptcha.atlassian.net/wiki/spaces/API/pages/5079073/createTask+captcha+task+creatingHow to upload normal captcha from image:
print $recognizer->try_upload( file => "/tmp/captcha.jpeg" # or content => "binary data", # and any options supported by this type you need languagePool => "en", numeric => 1, minLength => 10 # type => 'ImageToTextTask' # you may specify it or not, because when `file' or `content' options detected it will be added automatically );
How to upload recaptcha:
print $recognizer->try_upload( type => 'NoCaptchaTaskProxyless', # here you need to specify type websiteURL => "https://www.google.com/", websiteKey => "6LeZhwoTAAAAAP51ukBEOocjtdKGRDei9wFxFSpm", languagePool => "rn" );
And so on for other types
SEE ALSO
WebService::Antigate, WebService::Antigate::V1
COPYRIGHT
Oleg G <oleg@cpan.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.