Skip to main content

python3-aioanticaptcha

PyPI version Python versions

Python library forked from anticaptchaofficial.

The main purpose of the fork was to add implementation for async request using aiohttp

How to install?

pip install python3-aioanticaptcha

Source

git clone https://github.com/andrersp/aioanticaptcha
python setup.py install

 

Example how to create Recaptcha V2 task and receive g-response:

import asyncio
from aioanticaptcha.recaptchav2proxyless import *


async def main():

    async with recaptchaV2Proxyless() as solver:
        solver.set_verbose(1)
        solver.set_key("YOUR_KEY")
        solver.set_website_url("https://website.com")
        solver.set_website_key("SITE_KEY")

        # only for V2-invisible Recaptcha! :
        # solver.set_is_invisible(1)

        g_response = solver.solve_and_return_solution()
        if g_response != 0:
            print("g-response: " + g_response)
        else:
            print("task finished with error " + solver.error_code)


if __name__ == "__main__":
    asyncio.run(main())

Report previosly solved Recaptcha V2/V3/Enterprise as incorrect:

...
solver.report_incorrect_recaptcha()

Report it as correct to improve your quality:

...
solver.report_correct_recaptcha()

 

Solve image captcha:

import asyncio
from aioanticaptcha.imagecaptcha import *


async def main():
    async with imagecaptcha() as solver:
        solver.set_verbose(1)
        solver.set_key("YOUR_KEY")
        captcha_text = await solver.solve_and_return_solution("captcha.jpeg")
        if captcha_text != 0:
            print("captcha text " + captcha_text)
        else:
            print("task finished with error " + solver.error_code)


if __name__ == "__main__":
    asyncio.run(main())

Report previosly solved image captcha as incorrect:

...
solver.report_incorrect_image_captcha()

 

Solve Funcaptcha (Arkoselabs):

import asyncio
from aioanticaptcha.funcaptchaproxyless import *


async def main():
    async with funcaptchaProxyless() as solver:
        solver.set_verbose(1)
        solver.set_key("YOUR_KEY")
        solver.set_website_url("https://website.com")
        solver.set_website_key("XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX")

        token = solver.solve_and_return_solution()
        if token != 0:
            print("result token: " + token)
        else:
            print("task finished with error " + solver.error_code)


if __name__ == "__main__":
    asyncio.run(main())

 

Solve GeeTest captcha:

import asyncio
from aioanticaptcha.geetestproxyless import *


async def main():
    async with geetestProxyless() as solver:
        solver.set_verbose(1)
        solver.set_key("YOUR_API_KEY")
        solver.set_website_url("https://address.com")
        solver.set_gt_key("CONSTANT_GT_KEY")
        solver.set_challenge_key("VARIABLE_CHALLENGE_KEY")
        token = solver.solve_and_return_solution()
        if token != 0:
            print("result tokens: ")
            print(token)
        else:
            print("task finished with error " + solver.error_code)


if __name__ == "__main__":
    asyncio.run(main())

 

Solve HCaptcha:

from aioanticaptcha.hcaptchaproxyless import *
import asyncio


async def main():
    async with hCaptchaProxyless() as solver:
        solver.set_verbose(1)
        solver.set_key("YOUR_KEY")
        solver.set_website_url("https://website.com")
        solver.set_website_key("SITE_KEY")

        g_response = solver.solve_and_return_solution()
        if g_response != 0:
            print("g-response: " + g_response)
        else:
            print("task finished with error " + solver.error_code)


if __name__ == "__main__":
    asyncio.run(main())

Check out examples for other captcha types

License MIT

Metadata

Release files for python3-aioanticaptcha 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python3-aioanticaptcha 1.2
File Size Uploaded
python3-aioanticaptcha-1.2.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python3-aioanticaptcha 1.2
File Interpreter ABI Platform
python3_aioanticaptcha-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.8 kB

Release files / python3-aioanticaptcha-1.2.tar.gz

Download URL python3-aioanticaptcha-1.2.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
42c3c90829037af30e744531f409702beec3fc79158c1185a38df49352782298
BLAKE2b-256 checksum
How to use checksums
dd96d664121d1da4f6caf3ca9c41841b5436084622079c2eae2dd54d0bd0c97b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.5

Release files / python3_aioanticaptcha-1.2-py3-none-any.whl

Download URL python3_aioanticaptcha-1.2-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2f3d4aa7ddd2b2d8b8e1d7b9b08db0ef5056e3c2f130b2b6dd37e5e4ab3e57d
BLAKE2b-256 checksum
How to use checksums
7e9318049d6605f58781501e7e2f778e42df0652ca27e76d97e7439cea6f5a07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.5

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files

1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page