The action is used to automatically recognize captchas through services or manually .
Captcha (from CAPTCHA - eng. C ompletely A utomated P ublic T uring test to tell C omputers and H umans A part - a fully automated public Turing test for distinguishing between computers and people) - a computer test used to determine who a user of a system is: a person or a computer.
Some types of captcha
How to add an action to a project?
There are several ways to add an action to a project.
Through the context menu of the BROWSER
To add a recognition action using the context menu of the ProjectMaker browser, you must right-click on the picture on the site and select the This is a captcha item!
1. Via the context menu of the PROJECT
Add Action → Tabs → Recognize Captcha
The disadvantage of this method is that you first need to download the image to your computer and then specify the path to the file in the action.
Anti-Captcha - there is also a table with valid parameters on the documentation page for solving simple text captchas
Even based on only these two services and only a small part of their parameters, you can see that
some parameters that are responsible for the same are named differently (case sensitivity - case and regesense )
others have the same name, answer for the same thing, but accept different types of values ( phrase)
there are parameters that coincide in name, purpose, accepted values, but in one service slightly more values can be passed than in another ( numeric )
Be extremely careful when writing a project for several captcha services using additional parameters.
Scale - with this setting you can reduce or increase the size of the sent image-captcha.
Glue captchas - it happens that a captcha consists of several images, then they can be combined so as not to spend money on recognizing separate parts. To merge captchas, if you did not merge them when recording a template, you need to set the "Merge captchas" checkbox in the properties window of the first captcha element. Then right-click on the next item and a new item, Glue to captcha, will appear in the context menu.
With each click, a new action will be created, the last one will have the Last Captcha checkbox (for the previous ones, this checkbox is removed).
This setting allows you not to wait for a response from the service, but to continue the template execution.
When this option is enabled, a new action Waiting for captcha recognition is created.It has no settings, only the Go back to Recognition button, when clicked, will redirect you to the main action (very convenient when these actions are located in different edges of the action canvas in the template). The main action has a reverse button - Go to the end of recognition.
After the template reaches the main Recognize captcha action , it will send the captcha to the service and continue working until it encounters the Waiting ... action, at this action it will stop and wait for a response from the service. After receiving the response, you can use the variables that were specified in the main action.
Captcha on the service is recognized by people, and people, as you know, tend to make mistakes. Sometimes employees make mistakes, or they don't read the task carefully and instead of writing the answer to the expression 3 + 88 =?, They write the expression itself, although it was indicated in the settings that this is a captcha where a mathematical task needs to be solved.
For such cases, this setting is used. - if the captcha was recognized incorrectly, then by sending a request for this url, you will complain about this specific recognition and the service will return your money.
Do not abuse this opportunity and use it only when the employee really made a mistake and misunderstood the captcha. If you complain and return money for correctly solved captchas, you will be banned very quickly.
With the help of these settings, you can save the image with the captcha and the answer to the specified directory.
This is useful when using CapMonster 2 (a program for automatic captcha recognition) - this software has a lot of captchas that it supports, as they say, out of the box, but there are also some for which you need to create modules yourself. And to create a module, you need a database of correctly solved captchas, this is where these action settings come to the rescue - you recognize a captcha manually or using services, save captchas and answers, and then use them to train CapMonster 2.
Directory - the directory where the pictures will be saved (you can use variables )
Answers - where to save answers to captchas:
The file name is convenient, but not always suitable, since Captchas may contain characters that cannot be used in file names in Windows - \/:*?”<>|
To file - when this setting is selected, a captcha picture with the name captcha (X) .png will be saved in the specified directory , where X is the serial number of the captcha. A captcha (X) .txt file will also be created in which the answer to this captcha will be. In this case, the system's restrictions on file naming will no longer be scary.
Ignore answer “sorry” - for some errors, the Recognize captcha action returns sorry instead of answering the captcha. When this option is enabled, the program will not save captchas with this answer.
when using CapMonster 2 (a program for automatic captcha recognition) - this software has a lot of captchas that it supports, as they say, out of the box, but there are also some for which you need to create modules yourself. And to create a module, you need a database of correctly recognized captchas, and this is where these action settings come to the rescue - you recognize the captcha manually or using services, save the captchas and answers, and then use them to train CapMonster 2.
Quite often, especially on weakly protected resources, a text captcha is encountered. It differs from a simple (graphic) captcha in that it is not drawn in a picture, but simply written in text. In principle, such a captcha does not need to be sent anywhere, it can be taken (parsed) directly from the text of the page. To parse the captcha from the text of the page, you need to take the text of the page using the Data action, select the text of the page and, by marking "parse the result", enter a regular expression for parsing the page in the parameters.
Flash captcha and captcha from any other element
If you come across a flash captcha, you can turn it (render) into a regular picture and also send it for recognition. Find this element in the tree of elements , right-click to bring up the menu to select actions on this element. Select the item "This is a captcha" there ... that's it!
make sure you have specified the API key in the settings and the service has money
After that, right-click in the field where you need to enter the answer to the captcha and select the Field for the result of captcha recognition, after which one more action will be added to enter the response to the captcha (for this Recording in the project must be enabled)
Each character is a separate HTML element. Click on the first picture right click-This is a captcha !, in the settings, select Stick captchas, right-click on the rest of the pictures and select Stick to captcha from the context menu. As a result, you should get four actions:
After launch, the first three actions will only collect pictures and stick to each other, and only the last action will glue the final part and send it to the service to recognize the full captcha.
Additional parameters when sending
Let's imagine that there is a similar captcha:
It consists of separate parts and you need to write the result of the expression (in this specific case - addition).
First you need to stick all the individual pictures into one. Then, for the last action, select the required service (in this example, RuCaptcha) and in the Parameters on the Additional tab, indicate that a mathematical action should be performed here (for RuCaptcha - calc = 1 )