vk-captcha-cyrillic


Namevk-captcha-cyrillic JSON
Version 2.0.3 PyPI version JSON
download
home_pagehttps://github.com/TheNotEasy/vk_captcha
SummaryNone
upload_time2025-02-04 10:34:57
maintainerNone
docs_urlNone
authorIMCorp
requires_pythonNone
licenseMIT
keywords vk captcha vk_captcha solver
VCS
bugtrack_url
requirements onnxruntime numpy opencv-python-headless requests aiohttp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<h1 align="center">
<a href="https://github.com/imartemy1524/vk_captcha">vk_captcha</a> 
- AI <a href="https://vk.com/dev">VK</a> captcha solver for <b>93.2%</b> accuracy
</h1>
<p align="center">
    <img alt="PyPI" src="https://img.shields.io/pypi/v/vk-captcha?color=green&label=PyPI">
    <img alt="PyPI - Downloads" src="https://img.shields.io/github/downloads/imartemy1524/vk_captcha/total">
</p>

## Fork
This is fork of [vk_captcha](https://github.com/imartemy1524/vk_captcha) without vk api modules references
and with [cyrillic model](https://cloud.mail.ru/public/Rks4/nVXkMG2Mz). Thanks [T3h-Verm](https://github.com/imartemy1524/vk_captcha/issues/9#issuecomment-1915583529)!

## Support
python3.3 - python3.12

## Installation

```
pip install git+https://github.com/TheNotEasy/vk_captcha
```


### Fast examples:

#### just solve captcha from *url* / *bytes*


```python
from vk_captcha import VkCaptchaSolver
import random, requests

session = requests.Session()  
session.headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0'

solver = VkCaptchaSolver(logging=True)  # use logging=False on deploy
sid = random.randint(122112, 10102012012012)
easy_captcha = False
url = f"https://api.vk.com/captcha.php?sid={sid}&s={int(easy_captcha)}"

answer, accuracy = solver.solve(
    url=url,
    minimum_accuracy=0.33,  # keep solving captcha while accuracy < 0.33
    repeat_count=14,  # if we solved captcha with less than minimum_accuracy, then retry repeat_count times
    session=session  # optional parameter. Useful if we want to use proxy or specific headers
)
# or
#answer, accuracy = solver.solve(bytes_data=session.get(url))
print(f"I solved captcha = {answer} with accuracy {accuracy:.4}")
```

#### async way:

```python
from vk_captcha import VkCaptchaSolver
import random, asyncio
solver = VkCaptchaSolver(logging=False)  # use logging=False on deploy
async def captcha_solver():
    sid = random.randint(122112, 10102012012012)
    easy_captcha = False
    url = f"https://api.vk.com/captcha.php?sid={sid}&s={int(easy_captcha)}"
    answer, accuracy = await solver.solve_async(url=url, minimum_accuracy=0.4, repeat_count=10)
    print(f"Solved captcha = {answer} with accuracy {accuracy:.4}")
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) # Only in windows
asyncio.run(captcha_solver())
```
Also, you can get some statistics of solving captcha:
```python
from vk_captcha import VkCaptchaSolver
solver = VkCaptchaSolver()
...
# solve some captchas
...
time_for1captcha = solver.argv_solve_time
total_solved = solver.TOTAL_COUNT
fail_count = solver.FAIL_COUNT  # you need directly increase it after getting second captcha error
```

In theory, for other languages you can use command line solver ( **NOT RECOMMENDED**, it will always load model again):

```
python -m vk_captcha -url "https://api.vk.com/captcha.php?sid=2323832899382092" -minimum-accuracy 0.33 -repeat-count 13
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/TheNotEasy/vk_captcha",
    "name": "vk-captcha-cyrillic",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "vk, captcha, vk_captcha, solver",
    "author": "IMCorp",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/e6/f4/b5c2c32ff46f76a9cc2e7cba4ddafb88c4e66cd1d10a290b30af7e3ca2f6/vk_captcha_cyrillic-2.0.3.tar.gz",
    "platform": null,
    "description": "\n<h1 align=\"center\">\n<a href=\"https://github.com/imartemy1524/vk_captcha\">vk_captcha</a> \n- AI <a href=\"https://vk.com/dev\">VK</a> captcha solver for <b>93.2%</b> accuracy\n</h1>\n<p align=\"center\">\n    <img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/vk-captcha?color=green&label=PyPI\">\n    <img alt=\"PyPI - Downloads\" src=\"https://img.shields.io/github/downloads/imartemy1524/vk_captcha/total\">\n</p>\n\n## Fork\nThis is fork of [vk_captcha](https://github.com/imartemy1524/vk_captcha) without vk api modules references\nand with [cyrillic model](https://cloud.mail.ru/public/Rks4/nVXkMG2Mz). Thanks [T3h-Verm](https://github.com/imartemy1524/vk_captcha/issues/9#issuecomment-1915583529)!\n\n## Support\npython3.3 - python3.12\n\n## Installation\n\n```\npip install git+https://github.com/TheNotEasy/vk_captcha\n```\n\n\n### Fast examples:\n\n#### just solve captcha from *url* / *bytes*\n\n\n```python\nfrom vk_captcha import VkCaptchaSolver\nimport random, requests\n\nsession = requests.Session()  \nsession.headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0'\n\nsolver = VkCaptchaSolver(logging=True)  # use logging=False on deploy\nsid = random.randint(122112, 10102012012012)\neasy_captcha = False\nurl = f\"https://api.vk.com/captcha.php?sid={sid}&s={int(easy_captcha)}\"\n\nanswer, accuracy = solver.solve(\n    url=url,\n    minimum_accuracy=0.33,  # keep solving captcha while accuracy < 0.33\n    repeat_count=14,  # if we solved captcha with less than minimum_accuracy, then retry repeat_count times\n    session=session  # optional parameter. Useful if we want to use proxy or specific headers\n)\n# or\n#answer, accuracy = solver.solve(bytes_data=session.get(url))\nprint(f\"I solved captcha = {answer} with accuracy {accuracy:.4}\")\n```\n\n#### async way:\n\n```python\nfrom vk_captcha import VkCaptchaSolver\nimport random, asyncio\nsolver = VkCaptchaSolver(logging=False)  # use logging=False on deploy\nasync def captcha_solver():\n    sid = random.randint(122112, 10102012012012)\n    easy_captcha = False\n    url = f\"https://api.vk.com/captcha.php?sid={sid}&s={int(easy_captcha)}\"\n    answer, accuracy = await solver.solve_async(url=url, minimum_accuracy=0.4, repeat_count=10)\n    print(f\"Solved captcha = {answer} with accuracy {accuracy:.4}\")\nasyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) # Only in windows\nasyncio.run(captcha_solver())\n```\nAlso, you can get some statistics of solving captcha:\n```python\nfrom vk_captcha import VkCaptchaSolver\nsolver = VkCaptchaSolver()\n...\n# solve some captchas\n...\ntime_for1captcha = solver.argv_solve_time\ntotal_solved = solver.TOTAL_COUNT\nfail_count = solver.FAIL_COUNT  # you need directly increase it after getting second captcha error\n```\n\nIn theory, for other languages you can use command line solver ( **NOT RECOMMENDED**, it will always load model again):\n\n```\npython -m vk_captcha -url \"https://api.vk.com/captcha.php?sid=2323832899382092\" -minimum-accuracy 0.33 -repeat-count 13\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": null,
    "version": "2.0.3",
    "project_urls": {
        "Homepage": "https://github.com/TheNotEasy/vk_captcha"
    },
    "split_keywords": [
        "vk",
        " captcha",
        " vk_captcha",
        " solver"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "071f18a5e0f9534105691d5d9157ef90348c03420cf63ac021b2e8623d9ac7f3",
                "md5": "e22266a926bcbe2b49b7beed6e01a6de",
                "sha256": "0602c26e8b1a6325b0577ff5fc3f1b8161ea1aa048498135f87b113d642ed032"
            },
            "downloads": -1,
            "filename": "vk_captcha_cyrillic-2.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e22266a926bcbe2b49b7beed6e01a6de",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 1623718,
            "upload_time": "2025-02-04T10:34:55",
            "upload_time_iso_8601": "2025-02-04T10:34:55.882223Z",
            "url": "https://files.pythonhosted.org/packages/07/1f/18a5e0f9534105691d5d9157ef90348c03420cf63ac021b2e8623d9ac7f3/vk_captcha_cyrillic-2.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e6f4b5c2c32ff46f76a9cc2e7cba4ddafb88c4e66cd1d10a290b30af7e3ca2f6",
                "md5": "7701bb9643c52d5cdde40de5e25f4603",
                "sha256": "50ab5083f7c32591bf8d975452ceb5b71c488a7aa6df8727625bbd6bbe5c5c72"
            },
            "downloads": -1,
            "filename": "vk_captcha_cyrillic-2.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "7701bb9643c52d5cdde40de5e25f4603",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1626336,
            "upload_time": "2025-02-04T10:34:57",
            "upload_time_iso_8601": "2025-02-04T10:34:57.729062Z",
            "url": "https://files.pythonhosted.org/packages/e6/f4/b5c2c32ff46f76a9cc2e7cba4ddafb88c4e66cd1d10a290b30af7e3ca2f6/vk_captcha_cyrillic-2.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-04 10:34:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "TheNotEasy",
    "github_project": "vk_captcha",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "onnxruntime",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "opencv-python-headless",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "aiohttp",
            "specs": []
        }
    ],
    "lcname": "vk-captcha-cyrillic"
}
        
Elapsed time: 1.56278s