'Recaptcha solver automation
I'm building a bot that purchases restocked items on ecommerce sites and I'm getting stuck at the recaptcha solver part. I have my bot connected to "Anti-Captcha" where they send you the solution code for the recaptcha, but I'm having troubles as to where I send the code I receive. Do I send it to google through a specified url or to the ecommerce site? Here is the code for the captcha solver:
def solve_captcha(current_url):
solver = recaptchaV2Proxyless()
solver.set_verbose(1)
solver.set_key(api_key)
solver.set_website_url(current_url)
solver.set_website_key(site_key)
print(solver.get_balance())
g_response = solver.solve_and_return_solution()
if g_response != 0:
print("g-response: " + g_response)
else:
print("task finished with error " + solver.error_code)
Solution 1:[1]
Once you get the captcha key you have to then send it to the ecommerce website. When you complete a captcha the website sends a POST request which contains the captcha key to itself. To be able to figure out where and how to send it you can solve the captcha manually and use your browser's developer tools to intercept which request sends the captcha key. From there on just replicate the request but insert the captcha key you get from the solver.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |