修复更新无提示

This commit is contained in:
ZJY 2021-09-08 10:53:38 +08:00
parent ee1caf3645
commit e49037ebf0
2 changed files with 3 additions and 1 deletions

View File

@ -147,7 +147,8 @@ func updateCookie() {
var pinky = fmt.Sprintf("pin=%s;wskey=%s;", ck.PtPin, ck.WsKey)
rsp := cmd(fmt.Sprintf(`python3 test.py "%s"`, pinky), &Sender{})
logs.Info(rsp)
if strings.Contains(rsp, "失效") {
if strings.Contains(rsp, "错误") {
ck.Push(fmt.Sprintf("Wskey失效账号%s", ck.PtPin))
(&JdCookie{}).Push(fmt.Sprintf("Wskey失效%s", ck.PtPin))
} else {
ss := regexp.MustCompile(`pt_key=([^;=\s]+);pt_pin=([^;=\s]+)`).FindAllStringSubmatch(rsp, -1)

View File

@ -91,6 +91,7 @@ var handleMessage = func(msgs ...interface{}) interface{} {
ss1 := regexp.MustCompile(`pin=([^;=\s]+);wskey=([^;=\s]+)`).FindAllStringSubmatch(msg, -1)
if strings.Contains(rsp, "错误") {
logs.Error("wskey错误")
sender.Reply(fmt.Sprintf("wskey错误"))
} else {
if len(ss1) > 0 {