diff --git a/main.go b/main.go index 322414a..203f33c 100644 --- a/main.go +++ b/main.go @@ -166,9 +166,10 @@ func main() { if !rsp.Success { switch rsp.Error { case client.NeedCaptcha: + _ = ioutil.WriteFile("captcha.jpg", rsp.CaptchaImage, 0677) img, _, _ := image.Decode(bytes.NewReader(rsp.CaptchaImage)) fmt.Println(asciiart.New("image", img).Art) - log.Warn("请输入验证码: (Enter 提交)") + log.Warn("请输入验证码 (captcha.jpg): (Enter 提交)") text, _ := console.ReadString('\n') rsp, err = cli.SubmitCaptcha(strings.ReplaceAll(text, "\n", ""), rsp.CaptchaSign) continue