Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

平时分、考试分、比例信息错误 #3

Open
wbil opened this issue Jun 25, 2023 · 10 comments
Open

平时分、考试分、比例信息错误 #3

wbil opened this issue Jun 25, 2023 · 10 comments
Labels
question Further information is requested

Comments

@wbil
Copy link

wbil commented Jun 25, 2023

计算比例:20.0:-10.0
平时分:85
卷面:83
总分:81

['2022-2023,1,B0400091S,模拟电子线路A,必修, ,4.0, , 3.10,85,54,83, ,81,0, , , ,电子与光学工程学院, ,0, ,0,1,2,3']

@yumoyum0
Copy link

计算比例:-2.5:12.0
平时分:92.9
卷面:92.5
总分:93
['2021-2022,2,B0600372S,物理实验(上),必修, ,1.0, ,4.30,92.9, ,92.5, ,93,0, , , ,理学院, ,0, ,0,1,2,3']

@love98ooo
Copy link
Owner

计算比例:-2.5:12.0 平时分:92.9 卷面:92.5 总分:93 ['2021-2022,2,B0600372S,物理实验(上),必修, ,1.0, ,4.30,92.9, ,92.5, ,93,0, , , ,理学院, ,0, ,0,1,2,3']

在最新版本中得到了修复

@love98ooo
Copy link
Owner

计算比例:20.0:-10.0 平时分:85 卷面:83 总分:81

['2022-2023,1,B0400091S,模拟电子线路A,必修, ,4.0, , 3.10,85,54,83, ,81,0, , , ,电子与光学工程学院, ,0, ,0,1,2,3']

这是正方教务返回的数据包存在问题,目前属于个例,暂时无法定位问题。

你可以尝试在控制台中执行以下命令:

{
    var a = document.getElementById("Form1").childNodes[1].value;
    const decodeUTF8FromBase64 = (base64) => {
        const text = atob(base64);
        const length = text.length;
        const bytes = new Uint8Array(length);
        for (var i = 0; i < length; i++) {
            bytes[i] = text.charCodeAt(i);
        }
        const decoder = new TextDecoder(); // default is utf-8
        return decoder.decode(bytes);
    };
    
    let text = decodeUTF8FromBase64(a);
    x = [];
    while (text.indexOf("<") !== -1) {
        if (text.slice(text.indexOf("<") + 1).indexOf("<") === -1) {
            break;
        } else if (
            text.slice(text.indexOf("<") + 1).indexOf("<") <
            text.slice(text.indexOf("<") + 1).indexOf(">")
        ) {
            text = text.slice(text.indexOf("<") + 1);
        } else {
            if (
                text.slice(text.indexOf("<") + 1, text.indexOf(">")) !== "&nbsp;;"
            ) {
                x.push(text.slice(text.indexOf("<") + 1, text.indexOf(">")));
            }
            text = text.slice(text.indexOf(">") + 1);
        }
    }
    let gg = [];
    
    for (let i = 0, now = 0; i <= x.length - 1;) {
        if (x[i] === "Text;") {
            if (now >= 9) {
                if (i + 48 >= x.length) {
                    break;
                }
                let ng = [];
                for (let j = i + 1; j < i + 48; j++) {
                    if (x[j] !== "Text;") {
                        x[j] = x[j].replace(" ", "").replace(";", "");
                        ng.push(x[j]);
                    }
                }
                gg.push(ng);
                i += 48;
            } else {
                now += 1;
                i += 1;
            }
        } else {
            i += 1;
        }
    }
    console.log(gg)
}

如果正常输出,请将敏感信息删除后的内容给我。

@love98ooo love98ooo added the question Further information is requested label Jul 1, 2023
@FishZe
Copy link
Contributor

FishZe commented Jul 4, 2023

我是不是写出了锅:anguished:

@love98ooo
Copy link
Owner

我是不是写出了锅:anguished:

@FishZe 应该是正方的问题,目前只有这一个数据问题

@yumoyum0
Copy link

yumoyum0 commented Jul 5, 2023

计算比例:Unknown
平时分:83
卷面:83
总分:83

计算比例:Unknown
平时分:92
卷面:92
总分:92

[ '2022-2023,2,B0301061S,汇编语言程序设计,必修,&nbsp;,2.0,&nbsp;, 3.30,83,&nbsp;,83,&nbsp;,83,0,&nbsp;,&nbsp;,&nbsp;,计算机学院,&nbsp;,0,&nbsp;,0,1,2,3',
'2022-2023,2,B0400032S,数字电路与逻辑设计B,必修,&nbsp;,3.0,&nbsp;, 4.20,92,&nbsp;,92,&nbsp;,92,0,&nbsp;,&nbsp;,&nbsp;,电子与光学工程学院,&nbsp;,0,&nbsp;,0,1,2,3']

计算比例:Unknown
平时分:95
卷面:94
总分:95

计算比例:Unknown
平时分:92.9
卷面:92.5
总分:93

计算比例:Unknown
平时分:95
卷面:94
总分:94

['2021-2022,2,B0301572C,JAVA程序设计,必修,&nbsp;,2.0,4.50,&nbsp;,95,&nbsp;,94,&nbsp;,95,0,&nbsp;,&nbsp;,&nbsp;,计算机学院,&nbsp;,0,&nbsp;,0,1,2,3',
'2021-2022,2,B0600372S,物理实验(上),必修,&nbsp;,1.0,4.30,&nbsp;,92.9,&nbsp;,92.5,&nbsp;,93,0,&nbsp;,&nbsp;,&nbsp;,理学院,&nbsp;,0,&nbsp;,0,1,2,3',
'2021-2022,2,B2110061C,职业生涯发展与规划,必修,&nbsp;,0.5,4.40,&nbsp;,95,&nbsp;,94,&nbsp;,94,0,&nbsp;,&nbsp;,&nbsp;,招生就业处,&nbsp;,0,&nbsp;,0,1,2,3'
]

@love98ooo
Copy link
Owner

计算比例:Unknown 平时分:83 卷面:83 总分:83

计算比例:Unknown 平时分:92 卷面:92 总分:92

[ '2022-2023,2,B0301061S,汇编语言程序设计,必修, ,2.0, , 3.30,83, ,83, ,83,0, , , ,计算机学院, ,0, ,0,1,2,3', '2022-2023,2,B0400032S,数字电路与逻辑设计B,必修, ,3.0, , 4.20,92, ,92, ,92,0, , , ,电子与光学工程学院, ,0, ,0,1,2,3']

计算比例:Unknown 平时分:95 卷面:94 总分:95

计算比例:Unknown 平时分:92.9 卷面:92.5 总分:93

计算比例:Unknown 平时分:95 卷面:94 总分:94

['2021-2022,2,B0301572C,JAVA程序设计,必修, ,2.0,4.50, ,95, ,94, ,95,0, , , ,计算机学院, ,0, ,0,1,2,3', '2021-2022,2,B0600372S,物理实验(上),必修, ,1.0,4.30, ,92.9, ,92.5, ,93,0, , , ,理学院, ,0, ,0,1,2,3', '2021-2022,2,B2110061C,职业生涯发展与规划,必修, ,0.5,4.40, ,95, ,94, ,94,0, , , ,招生就业处, ,0, ,0,1,2,3' ]

@yumoyum0 "Unknown"是我设置的,有些比例倒推不出来,所以是“Unknown"。有考虑增加一个联网查询占比的功能,不过这个工作量很大,还涉及到数据的维护,所以还没有列入开发计划中。

@love98ooo
Copy link
Owner

@yumoyum0 #11

@cym29
Copy link

cym29 commented Sep 5, 2023

我为什么打开了之后平时分卷面分上面全是空白的

@love98ooo
Copy link
Owner

我为什么打开了之后平时分卷面分上面全是空白的

image
更新后的正方返回的数据包就不包含原始分了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants