WebService::AntiCaptcha - anti-captcha.com API
use WebService::AntiCaptcha; my $wac = WebService::AntiCaptcha->new( clientKey => 'your_client_key' ); my $res = $wac->getBalance or die $wac->errstr; print $res->{balance};
WebService::AntiCaptcha is for https://anticaptcha.atlassian.net/wiki/spaces/API/pages/196635/Documentation+in+English
Note we don't raise error for API response errorId > 0. You should handle those yourself.
# after each method call die $wac_res->{errorDescription} if $wac_res->{errorId};
https://anticaptcha.atlassian.net/wiki/spaces/API/pages/5079073/createTask+captcha+task+creating
my $res = $wac->createTask($task, $softId, $languagePool);
my $res = $wac->createTask({ type => 'ImageToTextTask', body => "BASE64_BODY_HERE!", }) or die $wac->errstr;
recaptcha solving. check xt/recaptcha.pl for a working example.
my $res = $wac->createTask({ type => 'NoCaptchaTaskProxyless', websiteURL => "http://mywebsite.com/recaptcha/test.php", websiteKey => "6Lc_aCMTAAAAABx7u2N0D1XnVbI_v6ZdbM6rYf16" }) or die $wac->errstr;
with proxy
my $res = $wac->createTask({ type => 'NoCaptchaTask', websiteURL => "http://mywebsite.com/recaptcha/test.php", websiteKey => "6Lc_aCMTAAAAABx7u2N0D1XnVbI_v6ZdbM6rYf16", "proxyType" => "http", "proxyAddress" => "8.8.8.8", "proxyPort" => 8080, "proxyLogin" => "proxyLoginHere", "proxyPassword" => "proxyPasswordHere", "userAgent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36" }) or die $wac->errstr;
https://anticaptcha.atlassian.net/wiki/spaces/API/pages/325877766/FunCaptchaTaskProxyless+-+funcaptcha+without+proxy
my $res = $wac->createTask({ type => 'FunCaptchaTaskProxyless', websiteURL => 'https://client-demo.arkoselabs.com/solo-animals', websitePublicKey => $public_key });
https://anticaptcha.atlassian.net/wiki/spaces/API/pages/65634347/FunCaptchaTask+-+rotating+captcha+funcaptcha.com
my $res = $wac->createTask({ type => 'FunCaptchaTask', websiteURL => 'https://client-demo.arkoselabs.com/solo-animals', websitePublicKey => $public_key, "proxyType" => "http", "proxyAddress" => "8.8.8.8", "proxyPort" => 8080, "proxyLogin" => "proxyLoginHere", "proxyPassword" => "proxyPasswordHere", "userAgent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36" });
https://anticaptcha.atlassian.net/wiki/spaces/API/pages/5079103/getTaskResult+request+task+result
my $res = $wac->getTaskResult($taskId) or die $wac->errstr;
https://anticaptcha.atlassian.net/wiki/spaces/API/pages/6389791/getBalance+retrieve+account+balance
my $res = $wac->getBalance or die $wac->errstr; print $res->{balance};
https://anticaptcha.atlassian.net/wiki/spaces/API/pages/8290316/getQueueStats+obtain+queue+load+statistics
my $res = $wac->queueId($queueId) or die $wac->errstr;
my $res = $wac->reportIncorrectImageCaptcha($taskId) or die $wac->errstr;
Fayland Lam <fayland@gmail.com>
Copyright 2017- Fayland Lam
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WebService::AntiCaptcha, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::AntiCaptcha
CPAN shell
perl -MCPAN -e shell install WebService::AntiCaptcha
For more information on module installation, please visit the detailed CPAN module installation guide.