//更新Cookies public string UpdateCookies(out bool IsSuccess) { IsSuccess = true; this.forcedpin = false; string recode = this.End(); if (recode.Equals("0")) { return("Cookies更新成功"); } else { this.forcedpin = true; //五次尝试,失败后不再尝试登录 for (int i = 0; i < 5; i++) { Image image = this.Start(); //解码 string code = this.YUDMDecode(image, out int resultId); if (code.Equals("")) { continue; } //云打码解码登录 string result = this.End(code); if (result.Equals("0")) { return(String.Format("云打码解码第{0}次更新Cookies成功", (i + 1).ToString())); } else { //登陆失败,验证码解码失败回报 YunDaMaTool.YDM_EasyReport(YunDaMaUserName, YunDaMaPassword, YunDaMaAppId, YunDaMaAppKey, resultId, false); } } IsSuccess = false; return("更新Cookies失败"); } }