From 4228a7aa9d04c0bd8b1023671d2e04c3a01b5451 Mon Sep 17 00:00:00 2001 From: ZJY <764763903@qq.com> Date: Tue, 7 Sep 2021 13:57:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/available.go | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/models/available.go b/models/available.go index 9fd308c..87826b3 100644 --- a/models/available.go +++ b/models/available.go @@ -184,44 +184,6 @@ func updateCookie() { } } - for i := 0; i < l-1; i++ { - if len(cks[i].WsKey) > 0 { - rsp := cmd(fmt.Sprintf(`python3 test.py "%s"`, cks[i].WsKey), &Sender{}) - ss := regexp.MustCompile(`pt_key=([^;=\s]+);pt_pin=([^;=\s]+)`).FindAllStringSubmatch(rsp, -1) - if len(ss) > 0 { - - xyb := 0 - for _, s := range ss { - ck := JdCookie{ - PtKey: s[1], - PtPin: s[2], - } - if CookieOK(&ck) { - xyb++ - if HasKey(ck.PtKey) { - (&JdCookie{}).Push(fmt.Sprintf("重复提交")) - } else { - if nck, err := GetJdCookie(ck.PtPin); err == nil { - nck.InPool(ck.PtKey) - msg := fmt.Sprintf("定时更新账号,%s", ck.PtPin) - (&JdCookie{}).Push(msg) - logs.Info(msg) - } else { - NewJdCookie(&ck) - msg := fmt.Sprintf("添加账号,账号名:%s", ck.PtPin) - logs.Info(msg) - } - } - } else { - (&JdCookie{}).Push(fmt.Sprintf("无效CK转换失败,%s", ck.PtPin)) - } - } - } - go func() { - Save <- &JdCookie{} - }() - } - } } func CookieOK(ck *JdCookie) bool {