How to solve the captcha enterprise?

1.3k Views Asked by At

I need to pass the captcha in steam, captcha kind Recaptcha v2 Enterprise, used the service 2recaptcha.com to pass the captcha, displays an error ERROR_CAPTCHA_UNSOLVABLE, the site itself is written that may require additional parameters such as the parameter s. I will show my code as an example:

def solve_recaptcha(data, url):
    solver = TwoCaptcha(api_2captcha)
    try:
        result = solver.recaptcha(sitekey=data["sitekey"], url=url, enterprise=1, datas=data["datas"])
    except Exception as ex:
        print(f"Error during captcha solution: {ex}")
    else:
        return result

At first I made a mistake and didn't notice that captcha enterprise, captcha was solved but steam gave me an error, now when I started solving captcha like enterprise captcha, 2recaptcha site gives me an error. What is my error and how can I solve it? If I'm not using the right tools, which ones should I use?

2

There are 2 best solutions below

0
On BEST ANSWER

I solved my problem with a while loop:

while True:
    try:
        result = solver.recaptcha(sitekey=data["sitekey"], url=url, enterprise=1, score=0.3)
    except Exception as ex:
        print(f"Error during captcha solution: {ex}")
    else:
        return result
0
On

The problem is not with your code. The error ERROR_CAPTCHA_UNSOLVABLE means that the captcha was not successfully solved. It's a normal error. List of errors: https://2captcha.com/2captcha-api#error_handling

from twocaptcha import TwoCaptcha

def solve_recaptcha(data, url):
    solver = TwoCaptcha("your API")
    try:
        result = solver.recaptcha(sitekey=data["sitekey"], url=url, enterprise=1, datas=data["datas"])
    except Exception as ex:
        print(f"Error during captcha solution: {ex}")
    else:
        return result

The other problem I am facing is that on the Steam website, there is no 'submit' button under reCaptcha. Don't know how to pass it yet.

There is a tutorial on 2captcha website. https://2captcha.com/2captcha-api#solving_recaptchav2_new On their demo page where you solve a captcha, there is a submit button.