# reCognizer v1.4
![Tests & Linting](https://github.com/Vinyzu/recognizer/actions/workflows/ci.yml/badge.svg)
[![](https://img.shields.io/pypi/v/recognizer.svg?color=1182C3)](https://pypi.org/project/recognizer/)
[![Downloads](https://static.pepy.tech/badge/recognizer)](https://pepy.tech/project/recognizer)
#### reCognizer is a free-to-use AI based [reCaptcha](https://developers.google.com/recaptcha) Solver. <br> Usable with an easy-to-use API, also available for Async and Sync Playwright. <br> 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](https://github.com/Vinyzu/Botright) to solve the Captchas consistently. <br> reCaptcha detects normal Playwright easily and you probably wont get any successful solves despite correct recognitions.
## Install it from PyPI
```bash
pip install recognizer
```
---
## Examples
### Possible Image Inputs
![Accepted Formats](https://i.ibb.co/nztTD9Z/formats.png)
### Example Solve Video (Good IP & Botright)
https://github.com/Vinyzu/recognizer/assets/50874994/95a713e3-bb46-474b-994f-cb3dacae9279
---
## Basic Usage
```py
# 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
```py
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
```py
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](https://github.com/Vinyzu/)
[GNU GPL](https://choosealicense.com/licenses/gpl-3.0/)
(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](https://github.com/QIN2DIM) (For basic project structure)
---
![Version](https://img.shields.io/badge/reCognizer-v1.4-blue)
![License](https://img.shields.io/badge/License-GNU%20GPL-green)
![Python](https://img.shields.io/badge/Python-v3.x-lightgrey)
[![my-discord](https://img.shields.io/badge/My_Discord-000?style=for-the-badge&logo=google-chat&logoColor=blue)](https://discordapp.com/users/935224495126487150)
[![buy-me-a-coffee](https://img.shields.io/badge/Buy_Me_A_Coffee-000?style=for-the-badge&logo=ko-fi&logoColor=brown)](https://ko-fi.com/vinyzu)
Raw data
{
"_id": null,
"home_page": "https://github.com/Vinyzu/recognizer",
"name": "recognizer",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "botright, playwright, browser, automation, fingerprints, fingerprinting, dataset, data, recaptcha, captcha",
"author": "Vinyzu",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/fd/e1/cc4dda9800619046c5c297c8090dab18101c75879634344467f0032a2886/recognizer-1.4.tar.gz",
"platform": null,
"description": "# reCognizer v1.4\r\n![Tests & Linting](https://github.com/Vinyzu/recognizer/actions/workflows/ci.yml/badge.svg)\r\n[![](https://img.shields.io/pypi/v/recognizer.svg?color=1182C3)](https://pypi.org/project/recognizer/)\r\n[![Downloads](https://static.pepy.tech/badge/recognizer)](https://pepy.tech/project/recognizer)\r\n\r\n\r\n#### reCognizer is a free-to-use AI based [reCaptcha](https://developers.google.com/recaptcha) Solver. <br> Usable with an easy-to-use API, also available for Async and Sync Playwright. <br> 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.\r\n\r\n#### Note: You Should use an undetected browser engine like [Botright](https://github.com/Vinyzu/Botright) to solve the Captchas consistently. <br> reCaptcha detects normal Playwright easily and you probably wont get any successful solves despite correct recognitions.\r\n\r\n## Install it from PyPI\r\n\r\n```bash\r\npip install recognizer\r\n```\r\n\r\n---\r\n\r\n## Examples\r\n\r\n### Possible Image Inputs\r\n![Accepted Formats](https://i.ibb.co/nztTD9Z/formats.png)\r\n\r\n### Example Solve Video (Good IP & Botright)\r\nhttps://github.com/Vinyzu/recognizer/assets/50874994/95a713e3-bb46-474b-994f-cb3dacae9279\r\n\r\n---\r\n\r\n## Basic Usage\r\n\r\n```py\r\n# Only for Type-Hints\r\nfrom typing import TypeVar, Sequence, Union\r\nfrom pathlib import Path\r\nfrom os import PathLike\r\n\r\naccepted_image_types = TypeVar(\"accepted_image_types\", Path, Union[PathLike[str], str], bytes, Sequence[Path], Sequence[Union[PathLike[str], str]], Sequence[bytes])\r\n\r\n# Real Code\r\nfrom recognizer import Detector\r\n\r\ndetector = Detector()\r\n\r\ntask_type: str = \"bicycle\"\r\nimages: accepted_image_types = \"recaptcha_image.png\"\r\narea_captcha: bool = False\r\n\r\nresponse, coordinates = detector.detect(task_type, images, area_captcha=area_captcha)\r\n```\r\n\r\n---\r\n\r\n## Playwright Usage\r\n### Sync Playwright\r\n\r\n```py\r\nfrom playwright.sync_api import sync_playwright, Playwright\r\nfrom recognizer.agents.playwright import SyncChallenger\r\n\r\n\r\ndef run(playwright: Playwright):\r\n browser = playwright.chromium.launch()\r\n page = browser.new_page()\r\n\r\n challenger = SyncChallenger(page)\r\n page.goto(\"https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox-explicit.php\")\r\n\r\n challenger.solve_recaptcha()\r\n\r\n browser.close()\r\n\r\n\r\nwith sync_playwright() as playwright:\r\n run(playwright)\r\n```\r\n\r\n\r\n### Async Playwright\r\n\r\n```py\r\nimport asyncio\r\n\r\nfrom playwright.async_api import async_playwright, Playwright\r\nfrom recognizer.agents.playwright import AsyncChallenger\r\n\r\n\r\nasync def run(playwright: Playwright):\r\n browser = await playwright.chromium.launch()\r\n page = await browser.new_page()\r\n\r\n challenger = AsyncChallenger(page)\r\n await page.goto(\"https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox-explicit.php\")\r\n\r\n await challenger.solve_recaptcha()\r\n\r\n await browser.close()\r\n\r\n\r\nasync def main():\r\n async with async_playwright() as playwright:\r\n await run(playwright)\r\n\r\n\r\nasyncio.run(main())\r\n```\r\n---\r\n\r\n## Copyright and License\r\n\u00a9 [Vinyzu](https://github.com/Vinyzu/)\r\n\r\n[GNU GPL](https://choosealicense.com/licenses/gpl-3.0/)\r\n\r\n(Commercial Usage is allowed, but source, license and copyright has to made available. reCaptcha Challenger does not provide and Liability or Warranty)\r\n\r\n---\r\n\r\n## Thanks to\r\n\r\n[QIN2DIM](https://github.com/QIN2DIM) (For basic project structure)\r\n\r\n---\r\n\r\n![Version](https://img.shields.io/badge/reCognizer-v1.4-blue)\r\n![License](https://img.shields.io/badge/License-GNU%20GPL-green)\r\n![Python](https://img.shields.io/badge/Python-v3.x-lightgrey)\r\n\r\n[![my-discord](https://img.shields.io/badge/My_Discord-000?style=for-the-badge&logo=google-chat&logoColor=blue)](https://discordapp.com/users/935224495126487150)\r\n[![buy-me-a-coffee](https://img.shields.io/badge/Buy_Me_A_Coffee-000?style=for-the-badge&logo=ko-fi&logoColor=brown)](https://ko-fi.com/vinyzu)\r\n",
"bugtrack_url": null,
"license": "GNU General Public License v3.0",
"summary": "\ud83e\udd89Gracefully face reCAPTCHA challenge with ultralytics YOLOv8-seg, CLIPs VIT-B/16 and CLIP-Seg/RD64. Implemented in playwright or an easy-to-use API.",
"version": "1.4",
"project_urls": {
"Homepage": "https://github.com/Vinyzu/recognizer",
"Source": "https://github.com/Vinyzu/reCognizer",
"Tracker": "https://github.com/Vinyzu/reCognizer/issues"
},
"split_keywords": [
"botright",
" playwright",
" browser",
" automation",
" fingerprints",
" fingerprinting",
" dataset",
" data",
" recaptcha",
" captcha"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "837028ced495a21f15fb769180d5f88630b72780de8c839221abf4bb858d44e4",
"md5": "ca068ed42d3a5ffababe40c26e40bfea",
"sha256": "81c92c42cd02362e5a039e19d9af1757f777b093ecc471c675b7018da1df5bd4"
},
"downloads": -1,
"filename": "recognizer-1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ca068ed42d3a5ffababe40c26e40bfea",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 30221,
"upload_time": "2024-04-10T18:51:47",
"upload_time_iso_8601": "2024-04-10T18:51:47.650992Z",
"url": "https://files.pythonhosted.org/packages/83/70/28ced495a21f15fb769180d5f88630b72780de8c839221abf4bb858d44e4/recognizer-1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fde1cc4dda9800619046c5c297c8090dab18101c75879634344467f0032a2886",
"md5": "eba5f0e11740c9d2c5d7123636696ecc",
"sha256": "657516e547b55cd9f82e63b72c854a9913117077fd1752164b5792fecb495192"
},
"downloads": -1,
"filename": "recognizer-1.4.tar.gz",
"has_sig": false,
"md5_digest": "eba5f0e11740c9d2c5d7123636696ecc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 30333,
"upload_time": "2024-04-10T18:51:50",
"upload_time_iso_8601": "2024-04-10T18:51:50.330261Z",
"url": "https://files.pythonhosted.org/packages/fd/e1/cc4dda9800619046c5c297c8090dab18101c75879634344467f0032a2886/recognizer-1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-10 18:51:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Vinyzu",
"github_project": "recognizer",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "setuptools",
"specs": [
[
"==",
"69.2.0"
]
]
},
{
"name": "opencv-python",
"specs": [
[
"~=",
"4.9.0.80"
]
]
},
{
"name": "imageio",
"specs": [
[
"~=",
"2.34.0"
]
]
},
{
"name": "ultralytics",
"specs": [
[
"~=",
"8.1.45"
]
]
},
{
"name": "transformers",
"specs": [
[
"~=",
"4.39.3"
]
]
},
{
"name": "numpy",
"specs": [
[
"~=",
"1.26.4"
]
]
},
{
"name": "playwright",
"specs": [
[
"==",
"1.42.0"
]
]
}
],
"lcname": "recognizer"
}