Xuexitong Homework Submit
学习通/超星作业自动化(v1.1.2):扫描作业、抓题模板、暂存/交卷、手写图答案流水线。致谢 HandWrite、学习通 API(mooc1-api.chaoxing.com)与超星图床上传接口(notice.chaoxing.com)。
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 2 · 434 · 1 current installs · 1 all-time installs
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description match the implementation: scripts list tasks, resolve doHomeWork URLs, fetch questions, produce templates, handle temp-save/submit, render handwritten PNGs and upload them. No unexplained credentials or unrelated services are requested.
Instruction Scope
Runtime instructions are concrete and limited to the stated purpose (running the included scripts). They require a Chaoxing cookie file (~/.openclaw/credentials/xuexitong_cookie.txt by default) and a local HandWrite environment for handwriting rendering; the SKILL.md mentions HandWrite but does not fully document the need to have the HandWrite project and its .venv in the expected location. Scripts also call GitHub for update checks and post images to Chaoxing's upload endpoint.
Install Mechanism
No install spec is provided (instruction-only install), and there is a small requirements.txt (requests). This is low-risk; the code runs locally and uses subprocess to invoke a HandWrite venv and the included Python scripts. Nothing is downloaded from arbitrary URLs during install.
Credentials
The skill does not request environment variables but reads a local cookie file containing Chaoxing session cookies (sensitive). That is reasonable for automating web actions on the user’s account, but users should understand the cookie grants account-level access. No other unrelated credentials are requested.
Persistence & Privilege
always:false and the skill does not request to be force-included. It performs no privileged system-wide changes and does not modify other skills' configuration. It does perform outgoing network calls (Chaoxing endpoints and GitHub) as expected for its purpose.
Assessment
This skill appears coherent with its stated purpose, but review these points before installing/using it:
- Authentication: the scripts require a Chaoxing session cookie file (default ~/.openclaw/credentials/xuexitong_cookie.txt). That file effectively grants access to your account — only use a cookie from an account you trust (consider a throwaway/test account).
- HandWrite dependency: rendering handwritten PNGs depends on a local HandWrite project and its virtualenv (.venv). The skill will call that venv's python via subprocess; ensure the HandWrite code is trusted and available at the expected path or adjust the script.
- Network calls: the code contacts mooc1-api.chaoxing.com and posts images to notice.chaoxing.com; it also optionally checks GitHub for updates. These are expected but review any corporate/network policy implications. Note: the upload endpoint in code uses plain HTTP (http://notice.chaoxing.com/...), which could expose uploads and any cookies in transit if network paths are untrusted — prefer HTTPS or verify your network is secure.
- Final submit is guarded: the script requires an explicit --confirm to perform final submission. Prefer running 'save' (temp-save) first and inspect results before submitting.
- Audit & test: since the skill runs subprocesses and performs writes/HTTP requests, inspect the included scripts yourself and test with a non-critical account if possible. If you rely on this in production, consider reviewing the full codepaths that build submission payloads and the exact cookie contents used.
If you want additional assurance, provide the full trailing parts of the truncated scripts (the submission payload assembly and any remaining code) so I can verify there are no hidden network endpoints or unexpected behaviors.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.1.2
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
Runtime requirements
📚 Clawdis
SKILL.md
学习通(超星)作业自动化 Skill
把「手动点网页」变成「可复用命令流程」:
- 列作业入口(taskrefId)
- 解析到 doHomeWork URL
- 抓题并生成可编辑答案模板
- 暂存(save)/交卷(submit)
- 手写图答案流水线:文本答案 → 手写 PNG → 图床 URL → HTML
<img>→ 暂存
当前版本:v1.1.2
致谢
感谢本 Skill 使用到的三个核心依赖/服务:
- HandWrite(手写渲染能力)
- 学习通 API:
mooc1-api.chaoxing.com - 超星图床上传接口:
notice.chaoxing.com/pc/files/uploadNoticeFile
安全约束
- 默认 Cookie 文件:
~/.openclaw/credentials/xuexitong_cookie.txt save是安全操作(暂存)submit是高风险操作(交卷),必须显式--confirm
快速开始
目录变量:
{baseDir}指当前 skill 根目录。
# 1) 列出作业入口
python3 {baseDir}/scripts/xuexitong_submit.py list
# 2) 解析 task 链接 -> doHomeWork URL
python3 {baseDir}/scripts/xuexitong_submit.py resolve \
--task-url "<mtaskmsgspecial url>"
# 3) 抓题 + 生成答案模板
python3 {baseDir}/scripts/xuexitong_submit.py fetch \
--dohomework-url "<doHomeWork url>" \
--out work.json
python3 {baseDir}/scripts/xuexitong_submit.py template \
--work-json work.json \
--out answers.json
# 4) 暂存(推荐先走这步)
python3 {baseDir}/scripts/xuexitong_submit.py save \
--dohomework-url "<doHomeWork url>" \
--answers answers.json \
--work-json work.json
# 5) 交卷(必须显式确认)
python3 {baseDir}/scripts/xuexitong_submit.py submit \
--dohomework-url "<doHomeWork url>" \
--answers answers.json \
--work-json work.json \
--confirm
手写图答案流水线
# A. 初始化:抓题并生成可编辑 answers_text.json
python3 {baseDir}/scripts/xuexitong_hw_pipeline.py init \
--dohomework-url "<doHomeWork url>" \
--outdir runs/run1
# 手动编辑 runs/run1/answers_text.json 的 answer 字段
# B. 执行:渲染->上传->生成 HTML 答案->暂存
python3 {baseDir}/scripts/xuexitong_hw_pipeline.py run \
--dohomework-url "<doHomeWork url>" \
--rundir runs/run1
扫描“疑似新作业且未填写”
python3 {baseDir}/scripts/xuexitong_scan_pending.py \
--limit 80 \
--out runs/pending_scan.json
输出包含:
candidates[]:候选作业(疑似未交且未写)resolveFailures[]:解析失败的任务入口
自动更新检查(已内置)
每次运行主脚本都会去 GitHub 检查最新版本(读取仓库 VERSION):
- 若有新版本,会打印更新提示
- 不会阻塞主流程(网络失败时静默跳过)
更新命令:
clawhub update xuexitong-homework-submit
临时关闭更新检查:
XUEXITONG_SKIP_UPDATE_CHECK=1 python3 {baseDir}/scripts/xuexitong_submit.py list
常见故障
- 401/403 或页面异常:Cookie 过期,重新抓取 Cookie。
- 单题提交成功但多题空白:请传
--work-json,脚本会逐题提取隐藏字段。 - 服务器偶发 EOF/限流:重试或加
--sleep-ms 200降速。
Files
8 totalSelect a file
Select a file to preview.
Comments
Loading comments…
