mirror of https://github.com/Xhofe/alist
🎇 delete useless cookieJar
parent
c03646dedf
commit
74d86f8cc4
|
@ -14,9 +14,7 @@ import (
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"golang.org/x/net/publicsuffix"
|
|
||||||
mathRand "math/rand"
|
mathRand "math/rand"
|
||||||
"net/http/cookiejar"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -245,9 +243,9 @@ type LoginResp struct {
|
||||||
func (c Cloud189) Login(account *model.Account) error {
|
func (c Cloud189) Login(account *model.Account) error {
|
||||||
client, ok := client189Map[account.Name]
|
client, ok := client189Map[account.Name]
|
||||||
if !ok {
|
if !ok {
|
||||||
cookieJar, _ := cookiejar.New(&cookiejar.Options{PublicSuffixList: publicsuffix.List})
|
//cookieJar, _ := cookiejar.New(&cookiejar.Options{PublicSuffixList: publicsuffix.List})
|
||||||
client = resty.New()
|
client = resty.New()
|
||||||
client.SetCookieJar(cookieJar)
|
//client.SetCookieJar(cookieJar)
|
||||||
client.SetRetryCount(3)
|
client.SetRetryCount(3)
|
||||||
}
|
}
|
||||||
url := "https://cloud.189.cn/api/portal/loginUrl.action?redirectURL=https%3A%2F%2Fcloud.189.cn%2Fmain.action"
|
url := "https://cloud.189.cn/api/portal/loginUrl.action?redirectURL=https%3A%2F%2Fcloud.189.cn%2Fmain.action"
|
||||||
|
|
Loading…
Reference in New Issue