Socket
Socket
Sign inDemoInstall

recognizer

Package Overview
Dependencies
6
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    recognizer

🦉Gracefully face reCAPTCHA challenge with ultralytics YOLOv8-seg, CLIPs VIT-B/16 and CLIP-Seg/RD64. Implemented in playwright or an easy-to-use API.


Maintainers
1

Readme

reCognizer v1.4

Tests & Linting Downloads

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

Examples

Possible Image Inputs

Accepted Formats

Example Solve Video (Good IP & Botright)

https://github.com/Vinyzu/recognizer/assets/50874994/95a713e3-bb46-474b-994f-cb3dacae9279


Basic Usage

# Only for Type-Hints
from typing import TypeVar, Sequence, Union
from pathlib import Path
from os import PathLike

accepted_image_types = TypeVar("accepted_image_types", Path, Union[PathLike[str], str], bytes, Sequence[Path], Sequence[Union[PathLike[str], str]], Sequence[bytes])

# Real Code
from recognizer import Detector

detector = Detector()

task_type: str = "bicycle"
images: accepted_image_types = "recaptcha_image.png"
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())

© Vinyzu

GNU GPL

(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)


Version License Python

my-discord buy-me-a-coffee

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc