Redirecting captcha input for a Java program

The problem is as follows:

There is a Java server that parses various sites and, as expected, it catches a Captcha and asks you to enter it.

Task: As soon as we understand that we are being asked to enter a captcha, the program stops and throws us a link with a "check", we enter (let's assume in the same program, from the category the main stream stops, the program asks us for the words to enter the captcha or a link with the entered captcha (there is some problems)) and then continues to work until the next incident.

Difficulties:

  1. When I stop the program at the moment of entering the captcha, I enter it myself, copy the link with the entered captcha and insert the program - the captcha does not pass. Because this link opens a new captcha. I.e. the state is not remembered and a new one is generated each time.
  2. If you just go to the site in the browser, then the captcha is not required. Programmatically User_Agent, referer and I put down other headers.

Question: Is there any possibility of solving this problem?

Author: Anton Shchyrov, 2019-08-15

1 answers

When I stop the program at the moment of entering the captcha, I enter it myself, copy the link with the entered captcha and insert the program - the captcha does not pass. Because this link opens a new captcha.

Which is logical. You must download the captcha yourself, give the downloaded images (not the link) for processing, and then continue the execution by entering the code

If you just go to the site in the browser, then the captcha is not required. Programmatically, User_Agent, referer, and others I put down the headers.

There are a lot of options:

  1. The robot works much faster than the user
  2. On the page hangs some JavaScript that is executed in the browser, but which is not executed by the robot
  3. ...
 2
Author: Anton Shchyrov, 2019-08-15 16:06:31