3

I recently signed up with anti-captcha and have been testing with the https://github.com/ad-m/python-anticaptcha/blob/master/examples/recaptcha_selenium.py script.

I cannot get past a reCAPTCHA that has no submit button (hidden or visible) nor a clear way to submit for verification. I've used the anti-captcha Firefox plugin, so I know it can be passed. But I am stuck at the point of doing this manually myself.

I thought this was going to be a helpful answer, but it doesn't go into depth. I am able to get the job.get_solution_response() token and enter it into the required textfield, but I cannot submit the "form."

Does anyone have success with this? I am also looking to do this in a headless version of the browser. Would a solution be different based on headless vs non-headless?

BTW, realtor(dot)com is the website I am having trouble with. If I am not allowed to post this site, please let me know so I can remove it.

2 Answers 2

2

I went back into the source code of the site and found they are using a function as a callback for verification...

I saw that they are using a function called solvedCaptcha and injecting a variable name payload. So here is how I solved it:

NOTE: Make sure the driver is currently on the reCAPTCHA page.

driver.execute_async_script("var payload = '<enter the job.get_solution_response() here>'; solvedCaptcha(payload);")

This async script then calls the page's verification and it reloads the blocked window.

NOTE: This CAPTCHA did not have a submit button and was not placed in a form. So using .submit() on an item within the driver would not work.

Sign up to request clarification or add additional context in comments.

13 Comments

Im getting a "javascript error: solvedCaptcha is not defined" error. Can you post the link to the source where you found that?
@h3y4w which source are you looking for?
where it mentions the function solvedCaptcha. Doesn't seem to work for me.
Which site are you trying this for? That was specific to realtor (dot) com. I found it by inspecting the page and looking at the functions going out when solving a captcha. And, successfully, assumed that was the right function because of the “payload” variable
Nevermind found it. Had to go through the network and source code in chrome tools to find the anon function.
|
0

try to sendKeys of \n or Keys.Enter to the textfield. This was my solution in my projects. Also this is generic one

4 Comments

Unfortunately this doesn’t work. I find the element by the selenium driver for the textfield, then try .submit() but it says something about there being no submit component. I even unhide the text field in the HTML code manually and try to press enter but it just gives me a newline
Can you provide link to the site?
the link is in the original question. However, I figured it out. I am going to post a solution, hoping it helps anyone who runs across the same issue.
link to the site with captcha

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.