Skip to main content

A lightweight python library for solving hCaptcha challenges with selenium.

Project description

hcaptcha-solver

PyPI - Status PyPI PyPI - Downloads

a lightweight Python library for solving hCaptcha challenges with selenium and neural networks

Installation

pip install --index-url https://test.pypi.org/simple/ hcaptcha-solver

Usage

from hcaptcha_solver import hcaptcha_solver
from selenium import webdriver

# create Captcha_Solver object to load ML models
captcha_solver = hcaptcha_solver.Captcha_Solver()

# create webdriver and access website with hCaptcha
driver = webdriver.Chrome()
driver.get("https://accounts.hcaptcha.com/demo")

# check for hCaptcha
captcha_solver.is_captcha_present(driver)

# solve hCaptcha
captcha_solver.solve_captcha(driver)

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 package features models for a handful of hCaptcha tasks. The currently available models and their labeling accuraciesare visualized in the figure below. Note that the accuracy was measured on training data and is therefore inflated.

The model availability and performance will be improved over time.

Current Model Labeling Performance

Model Labeling Accuracy

Current Data Availability

Data Availability

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

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 13/08/2023

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

hcaptcha_solver-0.2.11.tar.gz (78.9 MB view details)

Uploaded Source

Built Distribution

hcaptcha_solver-0.2.11-py2.py3-none-any.whl (78.9 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file hcaptcha_solver-0.2.11.tar.gz.

File metadata

  • Download URL: hcaptcha_solver-0.2.11.tar.gz
  • Upload date:
  • Size: 78.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for hcaptcha_solver-0.2.11.tar.gz
Algorithm Hash digest
SHA256 953ffc38533caa08ce3a4fdf618a4a152dd393a374d5096f65998a25752b7f96
MD5 d698962dfe0a32fa31cae5e522b4bb44
BLAKE2b-256 52c2aeec8732d5b80e54cc8848fb39d85e698aa3c99314e4ce6aa536c7938105

See more details on using hashes here.

File details

Details for the file hcaptcha_solver-0.2.11-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for hcaptcha_solver-0.2.11-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 81ef75beb60201860f7ec7952190fbf5687393db9e8c9a7d606bb857a5b28f20
MD5 cc71cc43ad84a04d58f538807f29714b
BLAKE2b-256 691641333cf7412c25355ad404ecb8a92977a833ea52f780a328a3bbb0b89b0d

See more details on using hashes here.

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