🦉 Gracefully face reCAPTCHA challenge with ultralytics YOLOv8-seg and CLIPs VIT-B/32. Implemented in playwright or an easy-to-use API.
Project description
reCognizer v1.0
reCognizer is a free-to-use AI based reCaptcha Solver.
Usable with an easy-to-use API, also available for Async and Sync Playwright.
You can pass almost any format into the Challenger, from full-page screenshots, only-captcha images and no-border images to single images in a list.
Note: You Should use an undetected browser engine like Botright to solve the Captchas consistently.
reCaptcha detects normal Playwright easily and you probably wont get any successful solves despite correct recognitions.
Install it from PyPI
pip install recognizer
Basic Usage
from pathlib import Path
from recognizer import Detector
detector = Detector()
task_type: str = "bicycle"
images = Path("recaptcha_image.png").read_bytes()
area_captcha: bool = False
response, coordinates = detector.detect("task_type", images, area_captcha=area_captcha)
Playwright Usage
Sync Playwright
from playwright.sync_api import sync_playwright, Playwright
from recognizer.agents.playwright import SyncChallenger
def run(playwright: Playwright):
browser = playwright.chromium.launch()
page = browser.new_page()
challenger = SyncChallenger(page)
page.goto("https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox-explicit.php")
challenger.solve_recaptcha()
browser.close()
with sync_playwright() as playwright:
run(playwright)
Async Playwright
import asyncio
from playwright.async_api import async_playwright, Playwright
from recognizer.agents.playwright import AsyncChallenger
async def run(playwright: Playwright):
browser = await playwright.chromium.launch()
page = await browser.new_page()
challenger = AsyncChallenger(page)
await page.goto("https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox-explicit.php")
await challenger.solve_recaptcha()
await browser.close()
async def main():
async with async_playwright() as playwright:
await run(playwright)
asyncio.run(main())
Copyright and License
© Vinyzu
(Commercial Usage is allowed, but source, license and copyright has to made available. reCaptcha Challenger does not provide and Liability or Warranty)
Thanks to
QIN2DIM (For basic project structure)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
recognizer-1.0.tar.gz
(26.1 kB
view hashes)
Built Distribution
recognizer-1.0-py3-none-any.whl
(26.2 kB
view hashes)