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():
async with ImageTyperzClient('6F0848592604C9E14F0EBEA7368493C5') as ita:
print(await ita.retrieve_balance())
job_id = await ita.submit_recaptcha(
page_url='https://example.com/login',
site_key='scraped-site-key',
recaptcha_type=reCAPTCHAType.INVISIBLE,
)
print(job_id)
while True:
try:
g_response = await ita.retrieve_recaptcha(job_id)
except NotDecoded:
await asyncio.sleep(5)
continue
else:
print(g_response)
break
g_response = await ita.complete_recaptcha(
page_url='https://example.com/login',
site_key='scraped-site-key',
recaptcha_type=reCAPTCHAType.INVISIBLE,
)
print(g_response)