fix: 实验成绩识别失败时跳过获取,防止后续流程中断#115
Merged
Merged
Conversation
BenderBlog
reviewed
Mar 6, 2026
Owner
代码块上点心,这一眼AI啊……我个 Dart 程序啥时候用 js 了,我还得反应下才发现只是原理展示 |
Contributor
Author
本意其实是展示一下这个网址现在访问会得到什么结果,不过后续代码没有使用这个,本应只提一嘴就好。 这是完整的 document.cookie = "UNI_GUI_SESSION_ID=; Path=/";
_clat_();
var w = window;
var dc = w.document;
try {
enableWarnOnClose(false)
} catch(e) {};
dc.open();
dc.write("\x3Chtml\x3E\n\x3Cbody bgcolor=\"#fff\"\x3E\n\x3Cp style=\"text-align:center;color:#0000A0\"\x3E本学期测验结束,系统停止登录\x3C/p\x3E\n\x3Cp style=\"text-align:center;color:#A05050\"\x3E\x3Ca href=\"http://wlsy.xidian.edu.cn/wgyreport/wgyreport.dll/?id=stu\"\x3E重新启动应用程序\x3C/a\x3E\x3C/p\x3E\n\x3C/body\x3E\n\x3C/html\x3E\n");
dc.close(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
出现问题
wgyreport.dll 网页目前未开放查询,意外导致实验列表解析、教师查询、实验课表展示等均未工作。
调用路径
recognizeAllScores()方法。session.getScoreImageUrls()方法。clickResponse.data变为:dataResponse.data接收到空字符串,传入_extractExperimentInfo,导致jsonDecode解析失败,抛出异常并逐级传递。experiment_session,由于未被捕获,后续的实验列表解析、教师查询、课表渲染等核心逻辑被全部跳过。解决方法
在
recognizeAllScores()处添加 try-catch 块,并打印相应日志。效果展示
修改前:
Details
修改后:
Details
附言
由于xdx目前还没有已完成的物理实验记录,暂无法覆盖带有历史成绩的测试。