fix 修复wskey失效七连推送
This commit is contained in:
parent
63f76fb281
commit
9446db0a8b
@ -6,7 +6,6 @@ import (
|
||||
"github.com/beego/beego/v2/client/httplib"
|
||||
"github.com/beego/beego/v2/core/logs"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
@ -152,36 +151,20 @@ func updateCookie() {
|
||||
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)
|
||||
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))
|
||||
}
|
||||
}
|
||||
ptKey := FetchJdCookieValue("pt_key", rsp)
|
||||
ptPin := FetchJdCookieValue("pt_pin", rsp)
|
||||
ck := JdCookie{
|
||||
PtKey: ptKey,
|
||||
PtPin: ptPin,
|
||||
}
|
||||
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 {
|
||||
(&JdCookie{}).Push(fmt.Sprintf("转换超时,请重新转换,%s", ck.PtPin))
|
||||
nck.Update(Available, false)
|
||||
(&JdCookie{}).Push("转换失败")
|
||||
}
|
||||
go func() {
|
||||
Save <- &JdCookie{}
|
||||
|
||||
@ -156,6 +156,7 @@ var handleMessage = func(msgs ...interface{}) interface{} {
|
||||
ck.Update(QQ, ck.QQ)
|
||||
}
|
||||
sender.Reply(fmt.Sprintf(msg))
|
||||
(&JdCookie{}).Push(msg)
|
||||
logs.Info(msg)
|
||||
}
|
||||
|
||||
|
||||
@ -32,6 +32,9 @@ AtTime: #填写1-12之间的数 填错自负默认为10 10点容易出现高
|
||||
以上是做完了 以下是待开发
|
||||
|
||||
新增纯CK版本 可配置调整为WSKEY+CK 和纯CK版本
|
||||
验证码登录直接接入
|
||||
plus登陆页面 ---会员中心给你们看个样板图把
|
||||
|
||||
|
||||
考虑仓库私有化 另附如果不喜欢别用 ninja和xdd魔改版大有人做 免费开源没收你钱总不能还挨你一顿喷?
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user