GithubHelp home page GithubHelp logo

wintercoder / zfjw_api Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 2.0 1.39 MB

正方教务系统非官方API(已废弃)请使用 https://github.com/WeGdufe/SmallGdufe-Server

License: MIT License

Java 100.00%
jwxt

zfjw_api's Introduction

ZFJW_API

原为广财教务系统非官方API(Java),现广财已换新系统,所以不能用在该校了,但可以通用于各高校正方教务系统,修改 JwUtils.java 里的 url 即可用在其他学校。

通过模拟登陆实现查分数、查课表、教学计划,若你想要在App、网站中实现查分则可用于服务器端,相比直接在客户端写这部分的好处是可控制。

USAGE

  • 各操作均需先登录,登陆用了教务的 default2.aspx 避开验证码。
  • 查成绩和课表分两种: 查当前学期成绩和查指定学期成绩,当前学期成绩是登陆后直接Get到的信息,比获取指定学期成绩更容易,对教务系统访问次数也更少。
  • 在客户端使用前可以先用TestParm.java(记得填学号密码)或者允许GET请求后浏览器测试下,相当于客户端
  • 修改代码前建议先看看 src/help.md 的说明

如需查课表给用户最好选择查课程介绍而不是直接查课表:

1. 5,6,7节相同课这种情况在课程介绍里是一个项而在课表里却是两个项,选课程介绍方便给不同课程填充不同颜色。  
2. 课程介绍在教务系统上先于课表公布

登陆 / 其他操作均需先登录

POST http://localhost:8080/jw/main.do
参数 action=login&uname=学号&upwd=密码

返回

字符串:"登陆成功" or "登陆失败"

查当前学期课表

POST http://localhost:8080/jw/main.do
参数 action=curSemesterKeBiao

返回Json数组格式的课表,注意type可能为空,因为教务系统中有些课是没有显示课程类型的

[
    {
        "name": "数据结构",
        "type": "必修",
        "time": "周一第1,2节{第1-16周}",
        "teacher": "Demo-匿名",
        "location": "拓新楼(SS1)135"
    },
    {
        "name": "可视化程序设计",
        "type": "任选",
        "time": "周二第1,2节{第1-16周}",
        "teacher": "Demo-匿名1",
        "location": "励学楼(SJ1)401"
    },
    {
        "name": "婚姻家庭纠纷法律实务",
        "type": "",
        "time": "周四第1,2节{第1-16周}",
        "teacher": "Demo-匿名2",
        "location": "拓新楼(SS1)335"
    }
]

失败则返回

[]

可能是未登录,也可能是教务系统Hold不住了

查当前学期成绩

POST http://localhost:8080/jw/main.do
参数 action=curSemesterScore

返回Json数组格式的成绩,包含学分、平时成绩、卷面成绩和总评

[
    {
        "courseName": "就业指导",
        "credit": "1.0",
        "regularScore": "85",
        "paperScore": "83",
        "totalScore": "84"
    },
    {
        "courseName": "软件工程课程设计",
        "credit": "2.0",
        "regularScore": "97",
        "paperScore": "95",
        "totalScore": "96"
    }
]

查当前学期课程介绍

POST http://localhost:8080/jw/main.do
参数 action=curSemesterJieShao

返回

[
    {
        "name": "形势与政策",
        "type": "必修",
        "time": "7,11,15(5,6)",
        "teacher": "匿名233",
        "location": "2-107"
    }
]

查指定学期课表

POST http://localhost:8080/jw/main.do
参数 action=keBiao&xuenian=2014-2015&xueqi=1
xuenian是学年,格式:20xx-20xx,有效参数:入学起的4年,如2013年入学,则2013-2014(大一)、2014-2015、2015-2016、2016-2017(大四)
xueqi为学期,有效参数:1、2、全部

返回格式同查当前学期课表

查指定学期成绩

POST http://localhost:8080/jw/main.do
参数 action=score&xuenian=2015-2016&xueqi=全部
xuenian是学年,格式:20xx-20xx,有效参数:入学起的4年
xueqi为学期,有效参数:1、2、全部

返回格式同查当前学期成绩

LICENSE

The MIT license

该API可用于学习、发布查课表/成绩工具,可商用,但若被用作不正当用途,如利用用户的教务系统账号密码非法获取他人身份信息,造成的后果与原作者无关。

zfjw_api's People

Contributors

wintercoder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

justinbaby zh-h

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.