public bool LoginWeb() { bool flag; if (base.IsLoadWebLogin) { flag = false; string cookieInternal = HttpHelper.GetCookieInternal(this.GetUrlLine()); if ((cookieInternal == "") || (AppInfo.PTInfo == null)) { return(flag); } AppInfo.PTInfo.WebCookie = cookieInternal; HttpHelper.SaveCookies(cookieInternal, ""); return(true); } string loginLine = this.GetLoginLine(); string pUrl = this.GetLoginLine(); string pResponsetext = ""; HttpHelper.GetResponse(ref pResponsetext, pUrl, "GET", string.Empty, loginLine, base.BetsTime2, "UTF-8", true); flag = pResponsetext.Contains("请输入用户名"); if (flag) { base.Token = CommFunc.GetIndexString(pResponsetext, "value=\"", "\"", pResponsetext.IndexOf("__RequestVerificationToken")); } return(flag); }
public override void GetSite(ConfigurationStatus.LotteryType pType, string playName = "") { try { if (base.Token == "") { string cookieInternal = HttpHelper.GetCookieInternal(this.GetUrlLine()); base.Token = CommFunc.GetIndexString(cookieInternal, "store.body.appstorage.token=", ";", 0); } string pUrl = this.GetLine() + "/ticket/ticketmod/ticketinfo.json"; string indexLine = this.GetIndexLine(); string pResponsetext = ""; string pData = $"token={base.Token}&ticketId={this.GetBetsLotteryID(pType)}"; HttpHelper.GetResponse(ref pResponsetext, pUrl, "POST", pData, indexLine, 0x2710, "UTF-8", true); if (pResponsetext != "") { string pExpect = CommFunc.GetIndexString(pResponsetext, "\"planId\":\"", "\"", 0); switch (CommFunc.GetLotteryID(pType)) { case "XJSSC": case "SD11X5": case "GD11X5": case "JX11X5": pExpect = pExpect.Replace("-", "-0"); break; } base.Expect = CommFunc.ConvertExpect(pExpect, pType); } } catch { } }
public bool LoginWeb() { string cookieInternal = HttpHelper.GetCookieInternal(this.GetUrlLine()); AppInfo.PTInfo.WebCookie = cookieInternal; HttpHelper.SaveCookies(cookieInternal, ""); return(true); }