No project description provided
Project description
vk_captcha - AI VK captcha solver for 93.2% accuracy
Fork
This is fork of vk_captcha without vk api modules references and with cyrillic model. Thanks T3h-Verm!
Support
python3.3 - python3.12
Installation
pip install git+https://github.com/TheNotEasy/vk_captcha
Fast examples:
just solve captcha from url / bytes
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:
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:
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vk_captcha_cyrillic-2.0.3.tar.gz.
File metadata
- Download URL: vk_captcha_cyrillic-2.0.3.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50ab5083f7c32591bf8d975452ceb5b71c488a7aa6df8727625bbd6bbe5c5c72
|
|
| MD5 |
7701bb9643c52d5cdde40de5e25f4603
|
|
| BLAKE2b-256 |
e6f4b5c2c32ff46f76a9cc2e7cba4ddafb88c4e66cd1d10a290b30af7e3ca2f6
|
File details
Details for the file vk_captcha_cyrillic-2.0.3-py3-none-any.whl.
File metadata
- Download URL: vk_captcha_cyrillic-2.0.3-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0602c26e8b1a6325b0577ff5fc3f1b8161ea1aa048498135f87b113d642ed032
|
|
| MD5 |
e22266a926bcbe2b49b7beed6e01a6de
|
|
| BLAKE2b-256 |
071f18a5e0f9534105691d5d9157ef90348c03420cf63ac021b2e8623d9ac7f3
|