Skip to main content

Util::AntiGate - CAPTCHA recognition via AntiGate service

Overview of the scraper

antigate

This scraper is typically used as a pluggable component in other scrapers where it may be necessary to solve captchas in the form of images, for example: SE::YandexSE::Yandex, Check::RosKomNadzorCheck::RosKomNadzor, as well as custom JavaScript scrapers.

The principle of operation of this scraper is to send the captcha image to the solving service and receive in response the text value shown on the captcha. The correctness of the solution depends only on the solving service and sometimes on the captcha settings.

The process of connecting and configuring this scraper is described in detail in the article AntiCaptcha settings

Scraper use cases

Capabilities

  • Supports integration with all AntiGate-compatible services: AntiCaptcha, RuCaptcha, 2captcha, XEvil, CapMonster, CapMonster.cloud, CapSolver, captchas.io, etc.
  • Ability to flexibly configure response timeout, captcha parameters, and notify the recognition service about an incorrectly solved captcha

Use Cases

  • Captcha recognition in built-in scrapers where it is optionally or strictly necessary to solve captchas to get results
  • Captcha recognition in custom JS scrapers
  • Recognition of small text data from images (e.g., phone numbers)

Queries

The queries must be a link to the captcha, e.g.:

https://files.a-parser.com/img/get-captcha-image.png

Output results examples

  • $answer - captcha response
  • $error - if an error occurred, its description

Recognized text output

Result format:

$answer

Example result:

332822

Possible settings

ParameterDefault valueDescription
ProviderAntiCaptchaSelection of the solving service, automatically substitutes the correct address (url) of the service
Provider urlDomain of the solving service, allows overriding the service domain, can be empty
Client keyAccess key to the service
HTTP errors retries5Number of attempts to recognize captcha in case of network failures
HTTP timeout60server response timeout in seconds
Wait between get status5Delay between polling the anti-gate service for captcha status
Max wait time300Maximum waiting time for recognized captcha
NO_SLOT_AVAILABLE retries5Number of attempts to upload captcha to the AntiCaptcha service if the service reports overload
NO_SLOT_AVAILABLE interval2Wait interval between attempts in seconds
Param "phrase"00 = default (one word). 1 = captcha has two words
Param "regsense"00 = default (case is irrelevant). 1 = case is important
Param "numeric"00 = default. 1 = captcha consists only of digits. 2 = Captcha has no digits
Param "calc"00 = default. 1 = mathematical operation from digits on the captcha
Param "min_len"00 = default. >0 = minimum length of text on the captcha that the worker must enter
Param "max_len"00 = default (unlimited). >0 = maximum length of text on the captcha that the worker must enter
Param "is_russian"00 = default. 1 = show captcha to a worker with knowledge of the Russian language
Fake answerFalse response, does not use the service but immediately outputs a random string as the response, used for testing scrapers
Report bad captchasIf the option is disabled, time spent checking the request for correct captcha will be saved. Relevant for CapMonster and XEvil
Log captcha imagesControl of captcha image output to the log
Stop task on zero balanceStop the job if the balance of the solving service runs out of funds