All notable changes to this project will be documented in this file.
- Fix double-encoded HTML entities not being decoded properly.
- Issue: Characters like
“<>appeared in exported text when the platform returned double-encoded entities (e.g.&ldquo;). - Solution: Call HTML entity decode twice to handle double-encoded cases.
- Affected: Python
formatter.pyand UserScript_userscript.js. - See:
docs/double-encoded-html-entities.mdfor details.
- Issue: Characters like
- Userscript: strip HTML tags from exported text to improve readability.
- Convert
<br>/<br/>/<br />to\n. - Convert common block endings like
</p>to\n. - Remove other tags and decode HTML entities.
- Convert
- Python exporter: apply the same HTML stripping rules in the formatter, so
题干/选项/问答题答案no longer contain raw HTML.
- This cleanup happens only at export time (linear scan), and is negligible compared to network request time. It also improves searchability by removing tag noise.
- Default export mode now prefers "standard answers" (platform
correctAnswer) instead of user-submitted answers.- Implementation uses
POST /questionTraining/student/answerwith a dummy answer to retrieveresult.correctAnswer. - Userscript: default button exports correct answers.
- Python: default CLI exports correct answers; legacy mode
--user-answerexports user's submitted answers without submitting.
- Implementation uses
- Userscript:
{"code":2001,"message":"缺少访问token"}- Improve Authorization handling by normalizing token and adding
Bearerprefix when needed. - Provide clearer error message to prompt re-login and cookie verification.
- Improve Authorization handling by normalizing token and adding
- Python:
ConnectionResetError(10054)when submitting many answers- Add retry with exponential backoff + jitter for
submit_answercalls. - Increase default submission delay.
- Add retry with exponential backoff + jitter for
- Question type detection: if extracted answer is boolean-like (
true/false), force it to be判断题and map to正确/错误.