Documentation
¶
Index ¶
- Constants
- func CheckUserCookie(user *model.User) bool
- func FillBlank(page playwright.Page, tips []string) error
- func FormatScore(score Score) string
- func FormatScoreShort(score Score) string
- func GetToken(code, sign, pushId string) (bool, error)
- func GetUserInfo(cookies []*http.Cookie) (string, string, error)
- func PrintScore(score Score) string
- func RemoveRepByLoop(slc []string) []string
- type Cookie
- type Core
- func (c *Core) CheckQrCode(code, pushID string) (*model.User, bool, error)
- func (c *Core) GenerateCode(pushID string) (string, string, error)
- func (c *Core) Init()
- func (c *Core) IsQuit() bool
- func (c *Core) L(retryTimes int, pushID string) (*model.User, error)
- func (c *Core) LearnArticle(user *model.User)
- func (c *Core) LearnVideo(user *model.User)
- func (c *Core) Quit()
- func (c *Core) RespondDaily(user *model.User, model string)
- type Data
- type Link
- type Score
- type SpecialContent
- type SpecialList
- type T
- type WeekList
Constants ¶
View Source
const ( MyPointsUri = "https://pc.xuexi.cn/points/my-points.html" DailyBUTTON = `` /* 151-byte string literal not displayed */ WEEKEND = `` /* 151-byte string literal not displayed */ SPECIALBUTTON = `` /* 152-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func FormatScore ¶
func FormatScoreShort ¶ added in v1.0.31
func GetUserInfo ¶
GetUserInfo *
- @Description: 获取用户信息
- @param cookies
- @return string
- @return string
- @return error
func PrintScore ¶
Types ¶
type Cookie ¶
type Cookie struct {
Name string `json:"name" yaml:"name"`
Value string `json:"value" yaml:"value"`
Domain string `json:"domain" yaml:"domain"`
Path string `json:"path" yaml:"path"`
Expires int `json:"expires" yaml:"expires"`
HTTPOnly bool `json:"httpOnly" yaml:"http_only"`
Secure bool `json:"secure" yaml:"secure"`
SameSite string `json:"same_site" yaml:"same_site"`
}
Cookie @Description:
type Core ¶
type Core struct {
ShowBrowser bool
Push func(id string, kind string, message string)
// contains filtered or unexported fields
}
Core @Description:
func (*Core) CheckQrCode ¶
func (*Core) GenerateCode ¶
GenerateCode
@Description: 生成二维码 * @receiver c * @return string 二维码连接 * @return string 二维码回调查询的code * @return error
type Link ¶
type Link struct {
Editor string `json:"editor"`
PublishTime string `json:"publishTime"`
ItemType string `json:"itemType"`
Author string `json:"author"`
CrossTime int `json:"crossTime"`
Source string `json:"source"`
NameB string `json:"nameB"`
Title string `json:"title"`
Type string `json:"type"`
Url string `json:"url"`
ShowSource string `json:"showSource"`
ItemId string `json:"itemId"`
ThumbImage string `json:"thumbImage"`
AuditTime string `json:"auditTime"`
ChannelNames []string `json:"channelNames"`
Producer string `json:"producer"`
ChannelIds []string `json:"channelIds"`
DataValid bool `json:"dataValid"`
}
type Score ¶
type SpecialContent ¶ added in v1.0.38
type SpecialContent struct {
Perfect bool `json:"perfect"`
TotalTime int `json:"totalTime"`
Questions []struct {
HasDescribe bool `json:"hasDescribe"`
// 提示信息
QuestionDesc string `json:"questionDesc"`
QuestionId int `json:"questionId"`
Origin string `json:"origin"`
// 答案
Answers []struct {
AnswerId int `json:"answerId"`
Label string `json:"label"`
Content string `json:"content"`
} `json:"answers"`
QuestionScore int `json:"questionScore"`
// 题目呢偶然
Body string `json:"body"`
OriginTitle string `json:"originTitle"`
AllCorrect bool `json:"allCorrect"`
Supplier string `json:"supplier"`
QuestionDescOrigin string `json:"questionDescOrigin"`
QuestionDisplay int `json:"questionDisplay"`
Recommender string `json:"recommender"`
} `json:"questions"`
Type int `json:"type"`
TotalScore int `json:"totalScore"`
PassScore int `json:"passScore"`
FinishedNum int `json:"finishedNum"`
UsedTime int `json:"usedTime"`
Name string `json:"name"`
QuestionNum int `json:"questionNum"`
Id int `json:"id"`
UniqueId string `json:"uniqueId"`
TipScoreReasonType int `json:"tipScoreReasonType"`
}
func GetSpecialContent ¶ added in v1.0.38
func GetSpecialContent(cookies []*http.Cookie, id int) *SpecialContent
type SpecialList ¶
type SpecialList struct {
PageNo int `json:"pageNo"`
PageSize int `json:"pageSize"`
TotalPageCount int `json:"totalPageCount"`
TotalCount int `json:"totalCount"`
List []struct {
TipScore float64 `json:"tipScore"`
EndDate string `json:"endDate"`
Achievement struct {
Score int `json:"score"`
Total int `json:"total"`
Correct int `json:"correct"`
} `json:"achievement"`
Year int `json:"year"`
SeeSolution bool `json:"seeSolution"`
Score int `json:"score"`
ExamScoreId int `json:"examScoreId"`
UsedTime int `json:"usedTime"`
Overdue bool `json:"overdue"`
Month int `json:"month"`
Name string `json:"name"`
QuestionNum int `json:"questionNum"`
AlreadyAnswerNum int `json:"alreadyAnswerNum"`
StartTime string `json:"startTime"`
Id int `json:"id"`
ExamTime int `json:"examTime"`
Forever int `json:"forever"`
StartDate string `json:"startDate"`
Status int `json:"status"`
} `json:"list"`
PageNum int `json:"pageNum"`
}
type WeekList ¶
type WeekList struct {
PageNo int `json:"pageNo"`
PageSize int `json:"pageSize"`
TotalPageCount int `json:"totalPageCount"`
TotalCount int `json:"totalCount"`
List []struct {
Month string `json:"month"`
Practices []struct {
SeeSolution bool `json:"seeSolution"`
TipScore float64 `json:"tipScore"`
ExamScoreId int `json:"examScoreId"`
Overdue bool `json:"overdue"`
Achievement struct {
Total int `json:"total"`
Correct int `json:"correct"`
} `json:"achievement"`
Name string `json:"name"`
BeginYear int `json:"beginYear"`
StartTime string `json:"startTime"`
Id int `json:"id"`
BeginMonth int `json:"beginMonth"`
Status int `json:"status"`
TipScoreReasonType int `json:"tipScoreReasonType"`
} `json:"practices"`
} `json:"list"`
PageNum int `json:"pageNum"`
}
Click to show internal directories.
Click to hide internal directories.