Util::AntiGate - captcha recognition through AntiGate service
Parser Overview
This scraper is usually used as a connectable 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 a text value in response, depicted on the captcha. The correctness of solving depends only on the solving service and sometimes on the captcha settings.
Detailed process of connecting and configuring this scraper is described in the article AntiCaptcha Settings
Scraper Use Cases
🔗 Yandex Parsing
Getting Yandex search results and the position number of the result
🔗 Captcha in JS scrapers
Example of a JS scraper 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 adjust the response waiting time, captcha parameters, and notify the solving service of incorrectly solved captcha
Usage Options
- Recognizing captchas in built-in scrapers, where it is optionally or mandatory to solve captchas to obtain results
- Captcha recognition in own JS scrapers
- Recognizing small text data from images (e.g. phones)
Queries
The requests should specify the link to the captcha, for example:
https://files.a-parser.com/img/get-captcha-image.png
Output Results Examples
$answer
- captcha response$error
- if an error occurred, its description
Output of Recognized Text
Result format:
$answer
Result example:
332822
Possible Settings
Parameter | Default Value | Description |
---|---|---|
Provider | AntiCaptcha | Selection of the solving service, automatically inserts the correct service address (url) |
Provider url | Domain of the solving service, allows to override the domain of the service, can be empty | |
Client key | Access key to the service | |
HTTP errors retries | 5 | Number of attempts to recognize the captcha in case of network failures |
HTTP timeout | 60 | Server response timeout in seconds |
Wait between get status | 5 | Delay between polls of the anti-gate service about the captcha status |
Max wait time | 300 | Maximum waiting time for the recognized captcha |
NO_SLOT_AVAILABLE retries | 5 | Number of attempts to upload the captcha to the anti-captcha service if the service issues an overload message |
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 is not important). 1 = case is important |
Param "numeric" | 0 | 0 = default value. 1 = captcha consists only of digits. 2 = Captcha has no digits |
Param "calc" | 0 | 0 = default value. 1 = mathematical operation from the digits 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 a 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 scraper testing |
Report bad captchas | ☐ | If the option is disabled, time spent on checking the correctness of the captcha request will be saved. Relevant for CapMonster and XEvil |
Log captcha images | ☐ | Control over the output of captcha images to the log |