mirror of https://github.com/Xhofe/alist
语法报错
parent
f5ee38a40a
commit
aa760f173f
|
@ -399,13 +399,15 @@ func (d *PikPak) refreshCaptchaToken(action string, metas map[string]string) err
|
||||||
if resp.Url != "" {
|
if resp.Url != "" {
|
||||||
// return fmt.Errorf(`need verify: <a target="_blank" href="%s">Click Here</a>`, resp.Url)
|
// return fmt.Errorf(`need verify: <a target="_blank" href="%s">Click Here</a>`, resp.Url)
|
||||||
if d.Addition.CaptchaApi != "" {
|
if d.Addition.CaptchaApi != "" {
|
||||||
var e ErrResp
|
|
||||||
var captcha_resp CaptchaApiResponse
|
var captcha_resp CaptchaApiResponse
|
||||||
_, e := d.request(d.Addition.CaptchaApi, http.MethodGet, func(req *resty.Request) {
|
_, err := d.request(d.Addition.CaptchaApi, http.MethodGet, func(req *resty.Request) {
|
||||||
req.SetQueryParams("url", resp.Url)
|
queryParams := map[string]string{
|
||||||
|
"url": resp.Url,
|
||||||
|
}
|
||||||
|
req.SetQueryParams(queryParams)
|
||||||
}, &captcha_resp)
|
}, &captcha_resp)
|
||||||
if e.IsError() {
|
if err != nil {
|
||||||
return errors.New(e.Error())
|
return err
|
||||||
}
|
}
|
||||||
if captcha_resp.Code == 200 {
|
if captcha_resp.Code == 200 {
|
||||||
d.Common.SetCaptchaToken(captcha_resp.Token)
|
d.Common.SetCaptchaToken(captcha_resp.Token)
|
||||||
|
|
Loading…
Reference in New Issue