修复了多选题会卡住的bug
This commit is contained in:
parent
f15d0e4ded
commit
18fed3acd9
|
@ -176,7 +176,7 @@ func (c *Core) RespondDaily(user *model.User, model string) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//id = 71
|
// id = 77
|
||||||
// 跳转到专项答题界面
|
// 跳转到专项答题界面
|
||||||
_, err = page.Goto(fmt.Sprintf("https://pc.xuexi.cn/points/exam-paper-detail.html?id=%d", id), playwright.PageGotoOptions{
|
_, err = page.Goto(fmt.Sprintf("https://pc.xuexi.cn/points/exam-paper-detail.html?id=%d", id), playwright.PageGotoOptions{
|
||||||
Referer: playwright.String(MyPointsUri),
|
Referer: playwright.String(MyPointsUri),
|
||||||
|
@ -402,11 +402,13 @@ func (c *Core) RespondDaily(user *model.User, model string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
answer = RemoveRepByLoop(answer)
|
||||||
|
|
||||||
if len(answer) < 1 {
|
if len(answer) < 1 {
|
||||||
answer = append(answer, options...)
|
answer = append(answer, options...)
|
||||||
log.Infoln("无法判断答案,自动选择ABCD")
|
log.Infoln("无法判断答案,自动选择ABCD")
|
||||||
}
|
}
|
||||||
log.Infoln("根据提示分别选择了", RemoveRepByLoop(answer))
|
log.Infoln("根据提示分别选择了", answer)
|
||||||
// 多选题选择
|
// 多选题选择
|
||||||
err = radioCheck(page, answer)
|
err = radioCheck(page, answer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue