智学网的api
Project description
zhixuewang-python
注意: 由于登录接口变动, 如果只有学生账号, 该项目与智学网网页版并无二致, 此项目将大概率不会再有关于接口的更新
zhixuewang是一个Python版的智学网API。它支持(包括但不限于):查询分数,查看作业情况,查看阅卷情况等。
支持三种账号类型:
- 学生账号 - 查看考试成绩、作业、同学信息等
- 教师账号 - 查看考试、阅卷进度、下载原卷等
- 家长账号 - 查看孩子的考试成绩和作业(部分功能受限)
安装
本项目是基于Python的,所以你需要先安装Python环境。
前置条件
- Python 3.7及以上
- 手
- 有手就行!
使用 pip 安装(推荐)
打开命令提示符(或bash),输入如下指令:
pip install zhixuewang
这将会自动安装本项目,待pip完成后安装便完成。
下载 源码 安装
打开命令提示符(或bash),输入如下指令:
git clone https://github.com/anwenhu/zhixuewang
cd zhixuewang
pip install .
简单示例
playwright登录(python3.7+)
安装依赖
playwright install chromium
python代码
from zhixuewang.account import login_playwright
zxw = login_playwright(您的智学网账号, 您的智学网密码)
# 然后通过浏览器完成人机验证
print(zxw.get_self_mark())
你也可以手动获取cookie登录
python代码
from zhixuewang.account import login_cookie
zxw = login_cookie(cookies)
print(zxw.get_self_mark())
cookie可以在登录智学网网页端后用以下js书签获取
javascript:(function(){function getCookies(){return document.cookie;}function copyToClipboard(text){const textarea=document.createElement('textarea');textarea.value=text;document.body.appendChild(textarea);textarea.select();document.execCommand('copy');document.body.removeChild(textarea);}const cookies=getCookies();copyToClipboard(cookies);alert('Cookies 已复制到剪切板!');})();
结果(仅供参考)
您的名字-考试名称
语文: 121.0
数学: 121.0
英语: 137.5
理综: 277.0
物理: 101.0
化学: 93.0
生物: 83.0
总分: 656.5
更多高级功能请查看文档。
问题和建议
如果您在使用的过程中遇到任何问题,或是有任何建议:
-
加入QQ群进行讨论:862767072(备注:GitHub智学网库);
-
前往 Issues 进行提问;
-
如果您想直接贡献代码,欢迎直接 Pull requests。
如果有其它不常见的功能需求, 可以前往 MasterYuan418/zxext 查找或提出。
Star History
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 zhixuewang-1.5.1.tar.gz.
File metadata
- Download URL: zhixuewang-1.5.1.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c55c1223ced72616301f6afbf847cfb1373e4028e93c6cfba88fae7dca734112
|
|
| MD5 |
10981260196c4e5afa6839f19be54490
|
|
| BLAKE2b-256 |
800901c2c5d5b8f07b3e6d83665d1521def4e89fc64861b47dd88e3327cc9e09
|
File details
Details for the file zhixuewang-1.5.1-py3-none-any.whl.
File metadata
- Download URL: zhixuewang-1.5.1-py3-none-any.whl
- Upload date:
- Size: 30.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09438ce301532ff4507767038fdc1235f1983c333202df8461e5172ac1cf2342
|
|
| MD5 |
a17291e85c5876ec8a7a306f011d1c90
|
|
| BLAKE2b-256 |
f430ae1e8ed8bc244c8905ad7777cfb34107d745891a30676005ad02a0a1c9d8
|