- AI captcha solver adapter
Requirements
Python3.3 - python3.10
Python 3.10 is not supported yet because
onnxruntime
is not supporting python3.10
UPDATE: Python3.10 is supported
Installation
pip install captcha-solve-adapter
from captcha_solve_adapter import CaptchaSolver
solver = CaptchaSolver(
logging=False,
img_width=300,
img_height=40,
max_length=10,
characters=['a','b','c','d'],
model_fname='Path/to/the/model.onnx'
)
def solve_captcha(url: str):
result, accur = solver.solve(url=url)
return accur
def solve_from_bytes(b: bytes):
result, accur = solver.solve(bytes_data=b)
return accur
def solve_frmo_file(file: str):
with open(file, 'rb') as f:
b = f.read()
return solve_from_bytes(b)