Util::AntiGate - CAPTCHA recognition via AntiGate service
Overview of the scraper

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::Yandex, 
Check::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
🔗 Yandex scraping
Getting Yandex SERP and result position number
🔗 Captcha in JS scrapers
Example of a JS scraper for working with captchas
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
| Parameter | Default value | Description | 
|---|---|---|
| Provider | AntiCaptcha | Selection of the solving service, automatically substitutes the correct address (url) of the service | 
| Provider url | Domain of the solving service, allows overriding the service domain, can be empty | |
| Client key | Access key to the service | |
| HTTP errors retries | 5 | Number of attempts to recognize captcha in case of network failures | 
| HTTP timeout | 60 | server response timeout in seconds | 
| Wait between get status | 5 | Delay between polling the anti-gate service for captcha status | 
| Max wait time | 300 | Maximum waiting time for recognized captcha | 
| NO_SLOT_AVAILABLE retries | 5 | Number of attempts to upload captcha to the AntiCaptcha service if the service reports overload | 
| NO_SLOT_AVAILABLE interval | 2 | Wait interval between attempts in seconds | 
| Param "phrase" | 0 | 0 = default (one word). 1 = captcha has two words | 
| Param "regsense" | 0 | 0 = default (case is irrelevant). 1 = case is important | 
| Param "numeric" | 0 | 0 = default. 1 = captcha consists only of digits. 2 = Captcha has no digits | 
| Param "calc" | 0 | 0 = default. 1 = mathematical operation from digits on the captcha | 
| Param "min_len" | 0 | 0 = default. >0 = minimum length of text on the captcha that the worker must enter | 
| Param "max_len" | 0 | 0 = default (unlimited). >0 = maximum length of text on the captcha that the worker must enter | 
| Param "is_russian" | 0 | 0 = default. 1 = show captcha to a worker with knowledge of the Russian language | 
| Fake answer | ☐ | False response, does not use the service but immediately outputs a random string as the response, used for testing scrapers | 
| Report bad captchas | ☐ | If the option is disabled, time spent checking the request for correct captcha will be saved. Relevant for CapMonster and XEvil | 
| Log captcha images | ☐ | Control of captcha image output to the log | 
| Stop task on zero balance | ☑ | Stop the job if the balance of the solving service runs out of funds |