hcaptcha-solver
a lightweight Python library for solving hCaptcha challenges with selenium and neural networks
NOTE: this package is still in early development.
If you encounter any issues or unexpected behaviours, please report them!
Installation
pip install hcaptcha-solver
Usage
from hcaptcha_solver import hcaptcha_solver
from selenium import webdriver
# setup chromedriver in english (other languages not supported yet)
options = webdriver.ChromeOptions()
options.add_experimental_option('prefs', {'intl.accept_languages': 'en,en_US'})
driver = webdriver.Chrome(options=options)
driver.get("https://accounts.hcaptcha.com/demo") # open any url with hCaptcha
# create Captcha_Solver object and solve hCaptcha
captcha_solver = hcaptcha_solver.Captcha_Solver(verbose=True)
captcha_solver.is_captcha_present(driver) # returns True
captcha_solver.solve_captcha(driver) # solves the hCaptcha
Functionality
Only V1 hCaptchas are supported - any other captcha types will be skipped.
The correct images are selected using Convolutional Neural Networks trained on labeled hCaptcha data.
The models are chosen by inspecting the captcha header, so the language has to be english in order for the matching to work. (See Issue #6)
The package features models for a handful of hCaptcha tasks. The currently available models and their labeling accuracies are visualized in the figure below. The accuracy was measured on limited data and is therefore not exact.
Functionality for V2 captchas is planned in a similar way to V1 captchas.
Current Model Labeling Performance
Current Data Availability
Contributing
If you encounter any bug, error or unexpected behaviour in general, please report them with an issue giving as much detail as possible - I will try to make this package easy-to-use for everyone.
Forks and pull requests are very welcome. You can also create issues to discuss possible changes or improvements.
To help collecting captchas, run dev/main.ipynb and submit the results. In this notebook you can also explore the data availability and train models.
updated 15/08/2023
Metadata
Release files for hcaptcha-solver 0.2.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hcaptcha_solver-0.2.14.tar.gz | 78.5 MB | Without provenance | Details for hcaptcha_solver-0.2.14.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hcaptcha_solver-0.2.14-py3-none-any.whl | Python 3 | none | any | Details for hcaptcha_solver-0.2.14-py3-none-any.whl |
Total release size: 157.0 MB
Release files / hcaptcha_solver-0.2.14.tar.gz
| Download URL | hcaptcha_solver-0.2.14.tar.gz |
|---|---|
| Size | 78.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b75d5d8a5b903368be8e150dfd07cdac0b79666fe52d352411758fd0cf4ee3b
|
|
BLAKE2b-256 checksum How to use checksums |
06e6646c201cac52c3453706d34d847cd5964cf09f9d34ad24d8ce6c71b2a4bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / hcaptcha_solver-0.2.14-py3-none-any.whl
| Download URL | hcaptcha_solver-0.2.14-py3-none-any.whl |
|---|---|
| Size | 78.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea80b0053e646b20678d5205a2a95e3b2ad04a967e2601fc2bb20dcd5f275da2
|
|
BLAKE2b-256 checksum How to use checksums |
7221a96301f7db6b68f15a57793bc23c4741381cd9c315e41924c3aecc29cce3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for hcaptcha-solver 0.2.14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.