Skip to main content

湘潭大学 教务系统 验证码识别

安装

从 PyPI 安装:

pip install xtu-edu-captcha-solver

从 GitHub 安装:

pip install git+https://github.com/xtu-org/xtu-edu-captcha-solver.git@main#egg=xtu-edu-captcha-solver

示例

from xtu.edu.captcha import captcha
from pathlib import Path
import asyncio
import httpx
import os

PATH = Path(os.getcwd()) / "data"

async def task():
    PATH.mkdir(exist_ok=True)
    async with httpx.AsyncClient() as client:
        resp = await client.get("https://jwxt.xtu.edu.cn/jsxsd/verifycode.servlet")
        code = captcha(resp.content)

        with open(PATH / f"{code}.png", "wb") as f:
            f.write(resp.content)

async def main():
    await asyncio.gather(*[task() for _ in range(10)])

开源协议

本仓库使用 MIT 协议,注意事项:

本软件按“现状”提供,不提供任何形式的明示或暗示的保证,包括但不限于对适销性、特定用途的适用性和非侵权性的保证。 在任何情况下,作者或版权持有人均不对任何索赔、损害或其他责任承担责任,无论是在合同诉讼、侵权行为还是其他方面,由本软件引起、或与本软件或使用或其它方式处理本软件有关。

原作者

原作者 GitHub仓库

依照 MIT 协议,您在修改、使用、分发本软件时,应当保留原作者的版权声明。

Metadata

Release files for xtu-edu-captcha-solver 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xtu-edu-captcha-solver 0.0.2
File Size Uploaded
xtu_edu_captcha_solver-0.0.2.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xtu-edu-captcha-solver 0.0.2
File Interpreter ABI Platform
xtu_edu_captcha_solver-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 14.1 kB

Release files / xtu_edu_captcha_solver-0.0.2.tar.gz

Download URL xtu_edu_captcha_solver-0.0.2.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8d4c660e79460ef948654c7da5ccccc8cea6ba2dc5ac7f59bfed78982e2beae5
BLAKE2b-256 checksum
How to use checksums
4617c324a515dcf58e42ecb28a0879180759cd76abc83f193f43ad2006a50a04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / xtu_edu_captcha_solver-0.0.2-py3-none-any.whl

Download URL xtu_edu_captcha_solver-0.0.2-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3fd0847cbe53f8e86bd28e2174887d6f8bc6a8bcb29b7812ca5674f236e2c986
BLAKE2b-256 checksum
How to use checksums
3592ba1d95e77734f47565eb494e4a0512d9dfc39915236ad0dfa62c51a8658a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page