jw

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2021 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HostURL 主网址
	HostURL = "jw.sec.lit.edu.cn" // 120.194.42.205:9001
	// DefaultURL 首页
	DefaultURL = "http://jw.sec.lit.edu.cn/default.aspx"
	// LoginURL 登陆地址
	LoginURL = "http://jw.sec.lit.edu.cn/_data/index_LOGIN.aspx"
	// MenuURL 菜单地址
	MenuURL = "http://jw.sec.lit.edu.cn/frame/menu.aspx"
	// MAINFRMURL 主页
	MAINFRMURL = "http://jw.sec.lit.edu.cn/MAINFRM.aspx"
	// ScoreURL 成绩检索地址
	ScoreURL = "http://jw.sec.lit.edu.cn/XSCJ/f_cjdab_rpt.aspx"
	// UserAgent UA
	UserAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36"
	// SchoolCode 院校代号
	SchoolCode = "11070"
)

Variables

View Source
var JWCookies []*http.Cookie

JWCookies 教务在线曲奇饼

Functions

func IsLogged added in v0.1.5

func IsLogged(cookies []*http.Cookie) (bool, error)

IsLogged 判断曲奇饼登陆有效性

func IsWork

func IsWork() (bool, error)

IsWork 检查曲奇饼可用性

func QueryScoreByStuNum

func QueryScoreByStuNum(cookies []*http.Cookie, stuid string) (string, error)

QueryScoreByStuNum 通过学号查询学生成绩, 管理员专用

func RefreshCookies

func RefreshCookies()

RefreshCookies 刷新教务在线曲奇饼

func SendLogin

func SendLogin(username string, password string, usertype string) ([]*http.Cookie, error)

SendLogin 发送登陆表单

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL