captchium


Namecaptchium JSON
Version 1.1.5 PyPI version JSON
download
home_pagehttps://github.com/d3kxrma/captchium
SummaryPython library for solving Google reCAPTCHA challenges
upload_time2024-12-21 14:36:06
maintainerNone
docs_urlNone
authordekxrma
requires_pythonNone
licenseMIT
keywords python recaptcha captcha solver selenium
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```shell
pip install captchium
```

## Usage

Here's an example of how to use Captchium:

```python
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**

![Not this iframe ](https://i.imgur.com/oSyw2qx.png)

**Pass this iframe**

![This iframe](https://i.imgur.com/uF0AtlI.png)

## 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:

```python
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](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](https://github.com/d3kxrma/captchium).

## License

Captchium is licensed under the MIT License. See the [LICENSE](https://github.com/d3kxrma/captchium/blob/main/LICENSE) file for more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/d3kxrma/captchium",
    "name": "captchium",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, recaptcha, captcha, solver, selenium",
    "author": "dekxrma",
    "author_email": "qqdjnuxez@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f3/b2/fe6c43dbb8da159e50c12646ca264d99ee6a7d9eb5ab39c7a95b17076af2/captchium-1.1.5.tar.gz",
    "platform": null,
    "description": "# Captchium\r\n\r\nCaptchium 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.\r\n\r\n## Installation\r\n\r\nTo install Captchium, you can use pip:\r\n\r\n```shell\r\npip install captchium\r\n```\r\n\r\n## Usage\r\n\r\nHere's an example of how to use Captchium:\r\n\r\n```python\r\nfrom selenium.webdriver.chrome.service import Service\r\nfrom selenium.webdriver.common.by import By\r\nfrom selenium import webdriver\r\nfrom captchium import Captchium\r\nfrom driverium import Driverium\r\n\r\n# Create a web driver instance\r\ndriver_options = webdriver.ChromeOptions()\r\nservice = Service(Driverium().get_driver())\r\ndriver = webdriver.Chrome(service=service, options=driver_options)\r\n\r\n# Initialize Captchium with the web driver instance\r\ncaptchium = Captchium(driver, recognize_service=\"google\")\r\n\r\n# Solve the CAPTCHA challenge within an iframe\r\niframe = driver.find_element(By.TAG_NAME, \"iframe\")\r\ncaptchium.solve(iframe)\r\n\r\n# Continue with your automation task\r\n# ...\r\n```\r\n\r\nTo 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.\r\n\r\n**Do not pass this iframe to the function**\r\n\r\n![Not this iframe ](https://i.imgur.com/oSyw2qx.png)\r\n\r\n**Pass this iframe**\r\n\r\n![This iframe](https://i.imgur.com/uF0AtlI.png)\r\n\r\n## Supported Audio Recognition Services\r\n\r\nCaptchium currently supports two audio recognition services: Google and Vosk. By default, it uses the Google service. You can specify the service when initializing Captchium:\r\n\r\n```python\r\ncaptchium = Captchium(driver, recognize_service=\"vosk\", model_path=\"path/to/model\")\r\n```\r\n\r\nPlease note that if you choose the Vosk service, you need to download the Vosk model from [https://alphacephei.com/vosk/models](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.\r\n\r\n## Contributing\r\n\r\nContributions 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](https://github.com/d3kxrma/captchium).\r\n\r\n## License\r\n\r\nCaptchium is licensed under the MIT License. See the [LICENSE](https://github.com/d3kxrma/captchium/blob/main/LICENSE) file for more information.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python library for solving Google reCAPTCHA challenges",
    "version": "1.1.5",
    "project_urls": {
        "Homepage": "https://github.com/d3kxrma/captchium",
        "Source": "https://github.com/d3kxrma/captchium"
    },
    "split_keywords": [
        "python",
        " recaptcha",
        " captcha",
        " solver",
        " selenium"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2f4b21901af068f8d1864306888b7c9e55c8d8f0e7d5e1c5ecfb0a706db73fe3",
                "md5": "1b355ec14ecc0fe49eb9bc2ae26bfc7f",
                "sha256": "dea84e280bfa3f9f442370015c08c01856b6dacdced8d83bb31862bc0b5e9013"
            },
            "downloads": -1,
            "filename": "captchium-1.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1b355ec14ecc0fe49eb9bc2ae26bfc7f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5496,
            "upload_time": "2024-12-21T14:36:03",
            "upload_time_iso_8601": "2024-12-21T14:36:03.820631Z",
            "url": "https://files.pythonhosted.org/packages/2f/4b/21901af068f8d1864306888b7c9e55c8d8f0e7d5e1c5ecfb0a706db73fe3/captchium-1.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f3b2fe6c43dbb8da159e50c12646ca264d99ee6a7d9eb5ab39c7a95b17076af2",
                "md5": "b1edcd98ae402e3c7aac82da0a701ff4",
                "sha256": "44941b7b59a7a3dadb169576b3110b687e61318d822971a4651b30e16a9fa6be"
            },
            "downloads": -1,
            "filename": "captchium-1.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "b1edcd98ae402e3c7aac82da0a701ff4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5070,
            "upload_time": "2024-12-21T14:36:06",
            "upload_time_iso_8601": "2024-12-21T14:36:06.005892Z",
            "url": "https://files.pythonhosted.org/packages/f3/b2/fe6c43dbb8da159e50c12646ca264d99ee6a7d9eb5ab39c7a95b17076af2/captchium-1.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-21 14:36:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "d3kxrma",
    "github_project": "captchium",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "captchium"
}
        
Elapsed time: 0.76789s