life is short, you need lis:)
npm i hdu-lis
const {casLogin} = require("hdu-lis")
const url ="https://cas.hdu.edu.cn/cas/login?********************"
casLogin(url,your_id, your_pw).then(res =>{
console.log(res.headers)
})
const {sklLogin} = require("hdu-lis")
sklLogin(your_id, your_pw).then(res=>{
console.log(res)
})
const { sklSign } = require("hdu-lis");
sklSign(your_id, your_pw).then((res) => {
console.log(res);
})
//return 200
const { phyLogin } = require("hdu-lis");
phyLogin(your_id, your_pw).then((res) => {
console.log(res);
})
//return cookie
get your experiments
const { phyExpt } = require("hdu-lis");
phyExpt(your_id, your_pw).then((res) => {
console.log(res);
})
//return expt list
just for this week
const { sklCourses } = require("hdu-lis");
sklCourses(your_id, your_pw).then((res) => {
console.log(res);
})
just for today
const { sklTodayCourses } = require("hdu-lis");
sklTodayCourses(your_id, your_pw).then((res) => {
console.log(res);
})
just for the rest of today
const { sklNowCourses } = require("hdu-lis");
sklNowCourses(your_id, your_pw).then((res) => {
console.log(res);
})
Thanks to the followings for their help.
- @BaiMeow
- @Camera-2018
- @AkaAny
npm login
npm publish