Python library for solving Google reCAPTCHA challenges
Project description
Captchium
Captchium is a Python library for solving Google reCAPTCHA challenges using audio recognition. It provides a convenient way to automate CAPTCHA solving in web scraping or automation tasks.
Installation
To install Captchium, you can use pip:
pip install captchium
Usage
Here's an example of how to use Captchium:
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium import webdriver
from captchium import Captchium
from driverium import Driverium
# Create a web driver instance
driver_options = webdriver.ChromeOptions()
service = Service(Driverium().get_driver())
driver = webdriver.Chrome(service=service, options=driver_options)
# Initialize Captchium with the web driver instance
captchium = Captchium(driver, recognize_service="google")
# Solve the CAPTCHA challenge within an iframe
iframe = driver.find_element(By.TAG_NAME, "iframe")
captchium.solve(iframe)
# Continue with your automation task
# ...
To use the solve
function, you need to pass the iframe element that opens after clicking on the CAPTCHA. This can be done by locating the iframe element using Selenium's find_element
method and passing it as an argument to the solve
function.
Do not pass this iframe to the function
Pass this iframe
Supported Audio Recognition Services
Captchium currently supports two audio recognition services: Google and Vosk. By default, it uses the Google service. You can specify the service when initializing Captchium:
captchium = Captchium(driver, recognize_service="vosk", model_path="path/to/model")
Please note that if you choose the Vosk service, you need to download the Vosk model from https://alphacephei.com/vosk/models and unpack it as 'model' in the current folder or specify the path to the model using the model_path parameter.
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the Captchium GitHub repository.
License
Captchium is licensed under the MIT License. See the LICENSE file for more information.
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
Built Distribution
File details
Details for the file captchium-1.1.3.tar.gz
.
File metadata
- Download URL: captchium-1.1.3.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3673a527880ed737f409bcc7ae2b097794cf697535c76b8c79facfbabd1bfbf2 |
|
MD5 | f807c8af7bfb8ad0a4fd352e79e40b4a |
|
BLAKE2b-256 | c74ffc55cace44b350f52f24fec2eb2dbfece56cb2064e77e066bf17e41c2af7 |
File details
Details for the file captchium-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: captchium-1.1.3-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ad21ebba54336f7ec2f287a0af7578226a9de002a46ceacdbb62e3ed33cf1b8 |
|
MD5 | 1df0ab70109032aa532d4482a7e4dc89 |
|
BLAKE2b-256 | 5be1af62e34275ceadb81a55fb11cb08be061c4d3eb00a92ab1c1ddea16489bd |