Skip to main content

No project description provided

Project description

Selenium 2CAPTCHA solver

Usage

from selenium_2captcha_solver import solve_recaptchav2
from twocaptcha import TwoCaptcha
from selenium import webdriver
from selenium.webdriver.common.by import By

# Create TwoCaptcha instance
two_captcha = TwoCaptcha(apiKey="2CAPTCHA_API_KEY")

# Create selenium driver instance and open page with captch you need to solve
driver = webdriver.Chrome()
driver.get("https://www.google.com/recaptcha/api2/demo")

# Find recaptcha element
recaptcha_element = driver.find_element(By.CLASS_NAME, 'g-recaptcha')

# Call the solve_recaptchav2
solve_recaptchav2(two_captcha, driver, recaptcha_element)

# And submit your form or anything else
driver.find_element(By.ID, "recaptcha-demo-submit").click()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

selenium_2captcha_solver-0.1.1.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

selenium_2captcha_solver-0.1.1-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page