imagetyperz-async
An asynchronous client for the ImageTyperz CAPTCHA-solving API.
httpx powers the HTTP requests.
At the moment, only image CAPTCHAS and reCAPTCHAs are supported.
Installation
pip install imagetyperz-async
Usage
import asyncio
from imagetyperz import ImageTyperzClient, reCAPTCHAType
from imagetyperz.exceptions import NotDecoded
async def demo():
###
# Context manager will handle the closing of connections in the underlying
# httpx AsyncClient at block end.
#
# Alternatively, `await ita.aclose()` may be manually called to perform
# cleanup.
#
# If no cleanup is performed, a warning may be emitted at Python exit.
#
async with ImageTyperzClient('6F0848592604C9E14F0EBEA7368493C5') as ita:
print(await ita.retrieve_balance())
#: 8.8325
# Submit reCAPTCHA job
job_id = await ita.submit_recaptcha(
page_url='https://example.com/login',
site_key='scraped-site-key',
recaptcha_type=reCAPTCHAType.INVISIBLE,
)
print(job_id)
#: 176140709
# Check for results of the reCAPTCHA job
while True:
try:
g_response = await ita.retrieve_recaptcha(job_id)
except NotDecoded:
await asyncio.sleep(5)
continue
else:
print(g_response)
#: 03AGdBq25hDTCjOq4QywdrY...
break
# Alternatively, use complete_recaptcha to automatically handle the polling
# for results — returning with the result when ready.
g_response = await ita.complete_recaptcha(
page_url='https://example.com/login',
site_key='scraped-site-key',
recaptcha_type=reCAPTCHAType.INVISIBLE,
)
print(g_response)
#: 03AGdBq25hDTCjOq4QywdrY...
Metadata
Release files for imagetyperz-async 0.3.2
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 |
|---|---|---|---|---|
| imagetyperz_async-0.3.2.tar.gz | 9.5 kB | Without provenance | Details for imagetyperz_async-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| imagetyperz_async-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for imagetyperz_async-0.3.2-py3-none-any.whl |
Total release size: 19.2 kB
Release files / imagetyperz_async-0.3.2.tar.gz
| Download URL | imagetyperz_async-0.3.2.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39726de75af0b472adf497870f3df873ee2349c0dc4933a6a849bb4d5b4abae2
|
|
BLAKE2b-256 checksum How to use checksums |
7525814eb36d328fd30e3a6d7e06fcea4beefa0b80ca565d2d2d426e52bd5783
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.11.1 Linux/5.13.0-52-generic
|
Release files / imagetyperz_async-0.3.2-py3-none-any.whl
| Download URL | imagetyperz_async-0.3.2-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0d055a70d2629bcf1916c09e441a4ce416381af929317a658a498e754d7a001
|
|
BLAKE2b-256 checksum How to use checksums |
1d0ede3047bfac8d911a7011a01344f000fd0b5128cf6aa11765d001cff19206
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.11.1 Linux/5.13.0-52-generic
|
Security for imagetyperz-async 0.3.2
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.