Util::AntiGate - captcha recognition via AntiGate service
Util::AntiGate parser overview
This parser is usually used as a connectable component in other parsers where it may be necessary to solve image captchas, for example: SE::Yandex,
Check::RosKomNadzor, as well as custom JavaScript parsers.
The principle of operation of this parser is to send the captcha image to the solving service and receive a text value in response, which is shown on the captcha. The correctness of solving depends only on the solving service and sometimes on the captcha settings.
The process of connecting and configuring this parser is described in detail in the article AntiGate setup
Util::AntiGate use cases
Parsing Yandex
Get Yandex search results and the position number of the result
Captcha in JS parsers
Example of a JS parser for working with captchas
Capabilities
- Supports working with all AntiGate-compatible services: AntiCaptcha, RuCaptcha, 2captcha, XEvil, CapMonster, CapMonster.cloud, CapSolver, captchas.io, etc.
- Ability to flexibly configure the response waiting time, captcha parameters and notify the solving service about the incorrectly solved captcha.
Usage options
- Captcha recognition in built-in parsers, where it is optional or mandatory to solve captchas to get results
- Captcha recognition in your own JS parsers
- Recognition of small text data from images (for example, phones)
Requests
The request must specify a link to the captcha, for example:
https://files.a-parser.com/img/get-captcha-image.png
Results
The recognized text will be output as a result:
332822
Possible results
$answer
- captcha response$error
- if an error occurred, its description
Possible settings
Parameter | Default value | Description |
---|---|---|
AntiGate Domain | antigate.com | Solving service domain, allows you to specify the domain of the service that supports the Antigate API |
Key | - | Access key to the service |
HTTP errors retries | 5 | Number of attempts to solve the 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 about the captcha status |
Max wait time | 300 | Maximum waiting time for the solved captcha |
NO_SLOT_AVAILABLE retries | 5 | Number of attempts to upload the captcha to the anti-captcha service if the service issues a message about overload |
NO_SLOT_AVAILABLE interval | 2 | Waiting interval between attempts in seconds |
Param "phrase" | 0 | 0 = default value (one word). 1 = captcha has two words |
Param "regsense" | 0 | 0 = default value (case insensitive). 1 = case sensitive |
Param "numeric" | 0 | 0 = default value. 1 = captcha consists only of numbers. 2 = Captcha has no numbers |
Param "calc" | 0 | 0 = default value. 1 = mathematical operation from numbers on the captcha |
Param "min_len" | 0 | 0 = default value. >0 = minimum length of text on the captcha that the worker must enter |
Param "max_len" | 0 | 0 = default value (unlimited). >0 = maximum length of text on the captcha that the worker must enter |
Param "is_russian" | 0 | 0 = default value. 1 = show the captcha to the worker with knowledge of the Russian language |
Fake answer | ☐ | False answer, does not use the service and immediately returns a random string as an answer, used for testing parsers |
Report bad captchas | ☐ | If the option is disabled, the time spent on checking the correctness of the captcha request will be saved. Relevant for CapMonster and XEvil |