fix: clear cookie for 189 cloud login

pull/774/head
Xhofe 2022-03-16 18:02:11 +08:00
parent 2dbedc245c
commit b21801d505
1 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,7 @@ import (
"io"
"math"
"net/http"
"net/http/cookiejar"
"path/filepath"
"regexp"
"strconv"
@ -105,6 +106,9 @@ func (driver Cloud189) Login(account *model.Account) error {
client.SetRetryCount(3)
client.SetHeader("Referer", "https://cloud.189.cn/")
}
// clear cookie
jar, _ := cookiejar.New(nil)
client.SetCookieJar(jar)
url := "https://cloud.189.cn/api/portal/loginUrl.action?redirectURL=https%3A%2F%2Fcloud.189.cn%2Fmain.action"
b := ""
lt := ""