How to bypass recaptcha using python selenium automation.
1. Register on fast captcha with your email id, mobile number and password of your choice.
2. Activate your account by entering OTP received on email and mobile number.
3. Generate API Secret Key.
4. Call Fast Captcha service to solve recaptcha.
pip3 install requests
import requests url = "https://thedataextractors.com/fast-captcha/api/solve/recaptcha" payload='webUrl=https://<website-url>&websiteKey=<data-sitekey>' headers = { 'apiSecretKey': '<fast-captcha-api-key>', 'Content-Type': 'application/x-www-form-urlencoded' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
5. Inject obtained recaptcha token or image captcha solution into automated web page.
solution = response.json()['solution']; //enter it in text area captcha_solution_element = driver.find_element('id', "g-recaptcha-response"); driver.execute_script("arguments[0].style.height = 'auto'; arguments[0].style.display = 'block';", captcha_solution_element); captcha_solution_element.send_keys(solution);
6. Submit the page and done.