Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 682 Bytes

README.md

File metadata and controls

40 lines (25 loc) · 682 Bytes

nocapaipy

[BETA]: A python wrapper for NoCaptchaAI

Installation

$ pip install git+https://github.com/noCaptchaAi/nocapaipy

Usage

import asyncio
import json

from pyppeteer import launch

from nocapaipy import solve_captcha

URL = 'https://accounts.hcaptcha.com/demo'
API_KEY = ''
UID = ''


async def main():
    browser = await launch(headless=True)
    page = await browser.newPage()

    await page.goto(URL)
    await page.waitForNetworkIdle()

    await solve_captcha(page, API_KEY, UID, 'free')

    await page.screenshot({'path': 'test.jpeg', 'type': 'jpeg'})

    await browser.close()


asyncio.get_event_loop().run_until_complete(main())