# captcha **Repository Path**: qianxunclub/captcha ## Basic Information - **Project Name**: captcha - **Description**: 12306验证码自动识别,QQ群:852214454 - **Primary Language**: Python - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: https://gitee.com/qianxunclub/ticket - **GVP Project**: No ## Statistics - **Stars**: 7 - **Forks**: 2 - **Created**: 2019-06-11 - **Last Updated**: 2024-02-28 ## Categories & Tags **Categories**: captcha **Tags**: None ## README # 12306 验证码自动识别 # 基础环境 - JDK8 - maven - python3 # python 依赖安装 Mac 或者 Linux 用户使用虚拟环境: ``` cd captcha/python python3 -m venv venv source venv/bin/activate sudo pip install -r requirements.txt ``` Windows 用户使用本地当前环境: ``` cd captcha/python sudo pip install -r requirements.txt ``` > 如果上面依赖下载太慢,可以使用 `pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple` 下载。 # 验证码识别测试 Mac 或者 Linux 用户使用虚拟环境: ``` cd captcha/python source venv/bin/activate python3 main.py ../temp/index.jpg ``` Windows 用户使用本地当前环境: ``` cd captcha/python python main.py ../temp/index.jpg ``` # 在线调用 我自己部署了一套,可以测试一把,不要暴力使用啊。。。 Api:http://captcha.qianxunclub.com/api/captcha Method:POST Content-Type:application/json 参数:image 入参为 base64图片字符串 ``` curl -H "Content-Type: application/json" -X POST --data '{"image":"base64图片"}' http://captcha.qianxunclub.com/api/captcha ```