public static Hashtable GetHashTableIdMark(List <objMatch> Odd_SboList, List <objMatch> Odd_IbetList, bool live) { Hashtable Output = new Hashtable(); foreach (objMatch Odd_Sbo in Odd_SboList) { foreach (objMatch Odd_Ibet in Odd_IbetList) { if (live) { } else { if (Convert.ToDateTime(Odd_Sbo.TimeNonLive) < Convert.ToDateTime(Odd_Ibet.TimeNonLive)) { continue; } } if (UtilSoccer.ChuanTenLeauge_Sbo(Odd_Sbo.LeaugeName) == UtilSoccer.ChuanTenLeauge_Ibet(Odd_Ibet.LeaugeName)) { if (UtilSoccer.ChuanTenTeam_Sbo(Odd_Sbo.HomeName) == UtilSoccer.ChuanTenTeam_Ibet(Odd_Ibet.HomeName) && UtilSoccer.ChuanTenTeam_Sbo(Odd_Sbo.AwayName) == UtilSoccer.ChuanTenTeam_Ibet(Odd_Ibet.AwayName)) { if (UtilSoccer.formatkeo(Odd_Sbo.hdp) == UtilSoccer.formatkeo(Odd_Ibet.hdp) && Odd_Sbo.BetType == Odd_Ibet.BetType) { Output.Add(Odd_Sbo.IdKeo, Odd_Ibet.IdKeo); break; } } } } } return(Output); }
private List <objMatch> convertStringToObjMatch(string input) { input = input.Replace("'", ""); List <objMatch> lst = new List <objMatch>(); string LeaugeName = "", HomeName = "", AwayName = ""; string[] dataMatch = input.Split(','); if (dataMatch[5] != "") { LeaugeName = UtilSoccer.ChuanTenLeauge_Ibet(dataMatch[5]); } if (LeaugeName.Contains("CORNERS") || LeaugeName.Contains("BOOKING") || LeaugeName.Contains("TEAM") || LeaugeName.Contains("MATCH")) { return(null); } if (dataMatch[6] != "") { HomeName = UtilSoccer.ChuanTenTeam_Ibet(dataMatch[6]); AwayName = UtilSoccer.ChuanTenTeam_Ibet(dataMatch[7]); } ///FT/// objMatch o = new objMatch(); o.LeaugeName = LeaugeName; o.HomeName = HomeName; o.AwayName = AwayName; o.IdKeo = dataMatch[31]; o.BetType = "1"; o.Keo = dataMatch[32]; o.Odd1 = dataMatch[33]; o.Odd2 = dataMatch[34]; if (dataMatch[35] == "a") { o.Keo = "-" + o.Keo; } o.Keo = UtilSoccer.formatkeo(o.Keo); if (o.IdKeo != "") { lst.Add(o); } ///OUFT/// o = new objMatch(); o.LeaugeName = LeaugeName; o.HomeName = HomeName; o.AwayName = AwayName; o.IdKeo = dataMatch[36]; o.BetType = "3"; o.Keo = dataMatch[37]; o.Odd1 = dataMatch[38]; o.Odd2 = dataMatch[39]; if (dataMatch[35] == "a") { o.Keo = "-" + o.Keo; } o.Keo = UtilSoccer.formatkeo(o.Keo); if (o.IdKeo != "") { lst.Add(o); } ///HT/// o = new objMatch(); o.LeaugeName = LeaugeName; o.HomeName = HomeName; o.AwayName = AwayName; o.IdKeo = dataMatch[44]; o.BetType = "7"; o.Keo = dataMatch[45]; o.Odd1 = dataMatch[46]; o.Odd2 = dataMatch[47]; if (dataMatch[48] == "a") { o.Keo = "-" + o.Keo; } o.Keo = UtilSoccer.formatkeo(o.Keo); if (o.IdKeo != "") { lst.Add(o); } ///HTOU/// o = new objMatch(); o.LeaugeName = LeaugeName; o.HomeName = HomeName; o.AwayName = AwayName; o.IdKeo = dataMatch[49]; o.BetType = "9"; o.Keo = dataMatch[50]; o.Odd1 = dataMatch[51]; o.Odd2 = dataMatch[52]; if (dataMatch[48] == "a") { o.Keo = "-" + o.Keo; } o.Keo = UtilSoccer.formatkeo(o.Keo); if (o.IdKeo != "") { lst.Add(o); } return(lst); }
public List <objMatch> getMatchOddLive() { try { lstLive.Clear(); string DataOddSboLive = http.Fetch(mainLink + "/web-root/restricted/odds-display/today-data.aspx?od-param=2,1,1,1,2,2,2,2,3,1&fi=0&v=0&dl=3", HttpHelper.HttpMethod.Get, null, null); DataOddSboLive = DataOddSboLive.Replace("\\u200C", ""); string leagueDataLive = "[" + Util.GetSubstringByString(DataOddSboLive, "[[[", "]],[[") + "]"; leagueDataLive = leagueDataLive.Replace("],[", "]\n["); hsLeagueLive.Clear(); foreach (string league in leagueDataLive.Split('\n')) { string leagueTemp = league.Replace("[", "").Replace("]", "").Replace("'", ""); string nameleagueTemp = UtilSoccer.ChuanTenLeauge_Sbo(leagueTemp.Split(',')[1]); if (nameleagueTemp.IndexOf("SPECIFIC") != -1 || nameleagueTemp.IndexOf("CORNERS") != -1 || nameleagueTemp.IndexOf("BOOKING") != -1 || nameleagueTemp.IndexOf("FANTASY MATCH") != -1 || nameleagueTemp.IndexOf("WHICH TEAM") != -1 || nameleagueTemp.IndexOf("TOTAL GOALS") != -1 || nameleagueTemp.IndexOf("INJURY") != -1 || nameleagueTemp.IndexOf("WINNER") != -1) { continue; } hsLeagueLive.Add(leagueTemp.Split(',')[0], nameleagueTemp); } string matchDataLive = "[" + Util.GetSubstringByString(DataOddSboLive, "]],[[", "]],[[") + "]"; matchDataLive = matchDataLive.Replace("],[", "]\n["); hsMatchLive.Clear(); foreach (string matchLive in matchDataLive.Split('\n')) { string matchTempLive = matchLive.Replace("[", "").Replace("]", "").Replace("'", ""); string[] arr_matchTempLive = matchTempLive.Split(','); string idmatchLive = Util.GetSubstringByStringLast(DataOddSboLive, "[", "," + arr_matchTempLive[0]); try { hsMatchLive.Add(idmatchLive, hsLeagueLive[arr_matchTempLive[2]].ToString() + "," + arr_matchTempLive[3] + "," + arr_matchTempLive[4] + "," + arr_matchTempLive[7]); } catch { continue; } } string oddDataLive = "[[" + Util.GetSubstringByString(DataOddSboLive, ",,[[", "]]],,") + "]]]"; foreach (string OddTempLive in oddDataLive.Split(new string[] { "]],[" }, StringSplitOptions.None)) { objMatch OddLive = new objMatch(); string OddTemp = OddTempLive.Replace("[", "").Replace("]", "").Replace("'", ""); string[] arr_OddTemp = OddTemp.Split(','); string infomatch = ""; try { infomatch = hsMatchLive[arr_OddTemp[1]].ToString(); } catch { continue; } OddLive.LeaugeName = UtilSoccer.ChuanTenLeauge_Sbo(infomatch.Split(',')[0]); OddLive.HomeName = UtilSoccer.ChuanTenTeam_Sbo(infomatch.Split(',')[1]); OddLive.AwayName = UtilSoccer.ChuanTenTeam_Sbo(infomatch.Split(',')[2]); OddLive.TimeLive = infomatch.Split(',')[3]; OddLive.IdKeo = arr_OddTemp[0]; OddLive.hdp = UtilSoccer.formatkeo(arr_OddTemp[5]); OddLive.BetType = arr_OddTemp[2]; OddLive.Odd1 = arr_OddTemp[6]; OddLive.Odd2 = arr_OddTemp[7]; lstLive.Add(OddLive); } } catch { lstLive.Clear(); return(lstLive); } return(lstLive); }
public List <objMatch> getMatchOddNonLive(DateTime TimeLimit) { try { lst.Clear(); string DataOddSboNonLive = http.Fetch(mainLink + "/web-root/restricted/odds-display/today-data.aspx?od-param=2,1,1,1,2,2,2,2,3,1&fi=1&v=0&dl=3", HttpHelper.HttpMethod.Get, null, null); string leagueDataNonLive = "[" + Util.GetSubstringByString(DataOddSboNonLive, "[[[", "]],[[") + "]"; leagueDataNonLive = leagueDataNonLive.Replace("],[", "]\n["); string str_LeaugeSbo = "", str_TeamSbo = ""; if (str_LeaugeSbo == "") { hsLeagueNonLive.Clear(); foreach (string league in leagueDataNonLive.Split('\n')) { string leagueTemp = league.Replace("[", "").Replace("]", "").Replace("'", ""); string nameleagueTemp = UtilSoccer.ChuanTenLeauge_Sbo(leagueTemp.Split(',')[1]).ToUpper(); if (nameleagueTemp.IndexOf("SPECIFIC") != -1 || nameleagueTemp.IndexOf("CORNERS") != -1 || nameleagueTemp.IndexOf("BOOKING") != -1 || nameleagueTemp.IndexOf("FANTASY MATCH") != -1 || nameleagueTemp.IndexOf("WHICH TEAM") != -1 || nameleagueTemp.IndexOf("TOTAL GOALS") != -1 || nameleagueTemp.IndexOf("INJURY") != -1 || nameleagueTemp.IndexOf("WINNER") != -1) { continue; } hsLeagueNonLive.Add(leagueTemp.Split(',')[0], nameleagueTemp); if (str_LeaugeSbo.IndexOf(nameleagueTemp) == -1) { str_LeaugeSbo += nameleagueTemp + ","; } } } string matchDataNonLive = "[" + Util.GetSubstringByString(DataOddSboNonLive, "]],[[", "]],[[") + "]"; matchDataNonLive = matchDataNonLive.Replace("],[", "]\n["); hsMatchNonLive.Clear(); foreach (string matchNonLive in matchDataNonLive.Split('\n')) { string matchTempNonLive = matchNonLive.Replace("[", "").Replace("]", "").Replace("'", ""); string[] arr_matchTempNonLive = matchTempNonLive.Split(','); string idmatchNonLive = Util.GetSubstringByStringLast(DataOddSboNonLive, "[", "," + arr_matchTempNonLive[0]); try { hsMatchNonLive.Add(idmatchNonLive, hsLeagueNonLive[arr_matchTempNonLive[2]].ToString() + "," + arr_matchTempNonLive[3] + "," + arr_matchTempNonLive[4] + "," + arr_matchTempNonLive[7]); } catch { continue; } if (str_TeamSbo.IndexOf(UtilSoccer.ChuanTenTeam_Sbo(arr_matchTempNonLive[3])) == -1 || str_TeamSbo.IndexOf(UtilSoccer.ChuanTenTeam_Sbo(arr_matchTempNonLive[4])) == -1) { str_TeamSbo += UtilSoccer.ChuanTenTeam_Sbo(arr_matchTempNonLive[3]) + "-" + UtilSoccer.ChuanTenTeam_Sbo(arr_matchTempNonLive[4]) + ","; } } string oddDataNonLive = "[[" + Util.GetSubstringByString(DataOddSboNonLive, ",,[[", "]]],,") + "]]]"; foreach (string OddTempNonLive in oddDataNonLive.Split(new string[] { "]],[" }, StringSplitOptions.None)) { objMatch o = new objMatch(); string OddTemp = OddTempNonLive.Replace("[", "").Replace("]", "").Replace("'", ""); string[] arr_OddTemp = OddTemp.Split(','); string infomatch = ""; try { infomatch = hsMatchNonLive[arr_OddTemp[1]].ToString(); } catch { continue; } o.LeaugeName = UtilSoccer.ChuanTenLeauge_Sbo(infomatch.Split(',')[0]); o.HomeName = UtilSoccer.ChuanTenTeam_Sbo(infomatch.Split(',')[1]); o.AwayName = UtilSoccer.ChuanTenTeam_Sbo(infomatch.Split(',')[2]); if (Matchs.Contains(o.HomeName + "-" + o.AwayName) == false) { Matchs += o.HomeName + "-" + o.AwayName + ","; } o.TimeNonLive = infomatch.Split(',')[3]; if (DateTime.Parse(o.TimeNonLive) > TimeLimit.AddHours(1)) { continue; } if (o.TimeNonLive.Split('/').Length == 1) { o.TimeNonLive = o.TimeLive; } o.IdKeo = arr_OddTemp[0]; o.hdp = UtilSoccer.formatkeo(arr_OddTemp[5]); o.BetType = arr_OddTemp[2]; o.Odd1 = arr_OddTemp[6]; o.Odd2 = arr_OddTemp[7]; lst.Add(o); } } catch (Exception) { lst.Clear(); return(lst); } TotalMatch = "SBO MATCH: " + (Matchs.Split(',').Length - 1).ToString(); return(lst); }
public List <objMatch> getMatchOddNonLive() { try { lst.Clear(); string data = http.Fetch(mainHost + "/UnderOver.aspx?Market=t&DispVer=new", HttpHelper.HttpMethod.Get, mainLink, null); int ik = data.IndexOf("name=\"k"); int iv = data.IndexOf("value=\"v"); string kIbet = data.Substring(ik + 6, iv - ik - 8); string vIbet = data.Substring(iv + 7, iv - ik - 8); string CT = Util.EscapeDataString(DateTime.Now.AddHours(-11).ToString()); data = http.Fetch(mainHost + "/UnderOver_data.aspx?Market=t&Sport=1&DT=&RT=W&CT=" + CT + "&Game=0&OrderBy=0&OddsType=4&MainLeague=0&DispRang=0&" + kIbet + "=" + vIbet + "&key=dodds&_=1502509515441", HttpHelper.HttpMethod.Get, mainHost + "/UnderOver.aspx?Market=t&DispVer=new", null); string LeaugeName = "", HomeName = "", AwayName = "", Time = ""; if (data == "") { lst.Clear(); login(); return(lst); } else { foreach (Match m in Regex.Matches(data, @"Nt\[\d+\]=\[.*\];")) { string strIbetMatch = m.Value.ToString().Replace("];", ""); strIbetMatch = Regex.Replace(strIbetMatch, @"Nt\[\d+\]=\[", ""); strIbetMatch = strIbetMatch.Replace("'", ""); string[] dataIbetMatch = strIbetMatch.Split(','); if (dataIbetMatch[5] != "") { LeaugeName = UtilSoccer.ChuanTenLeauge_Ibet(dataIbetMatch[5]); } if (LeaugeName.Contains("CORNERS") || LeaugeName.Contains("BOOKING") || LeaugeName.Contains("TEAM") || LeaugeName.Contains("MATCH")) { continue; } if (dataIbetMatch[6] != "") { HomeName = UtilSoccer.ChuanTenTeam_Ibet(dataIbetMatch[6]); AwayName = UtilSoccer.ChuanTenTeam_Ibet(dataIbetMatch[7]); } objMatch o; if (dataIbetMatch[12] != "") { Time = dataIbetMatch[12].Split(' ')[dataIbetMatch[12].Split(' ').Length - 1]; Time = UtilSoccer.convertSoccerTime(Time); } ///FT/// try { o = new objMatch(); o.TimeNonLive = Time; o.LeaugeName = LeaugeName; o.HomeName = HomeName; o.AwayName = AwayName; o.IdKeo = dataIbetMatch[31]; o.BetType = "1"; o.Keo = dataIbetMatch[32]; o.Odd1 = dataIbetMatch[33]; o.Odd2 = dataIbetMatch[34]; if (dataIbetMatch[35] == "a") { o.Keo = "-" + o.Keo; } o.Keo = UtilSoccer.formatkeo(o.Keo); lst.Add(o); } catch { } ///OUFT/// try { o = new objMatch(); o.TimeNonLive = Time; o.LeaugeName = LeaugeName; o.HomeName = HomeName; o.AwayName = AwayName; o.IdKeo = dataIbetMatch[36]; o.BetType = "3"; o.Keo = dataIbetMatch[37]; o.Odd1 = dataIbetMatch[38]; o.Odd2 = dataIbetMatch[39]; if (dataIbetMatch[35] == "a") { o.Keo = "-" + o.Keo; } o.Keo = UtilSoccer.formatkeo(o.Keo); lst.Add(o); } catch { } ///HT/// try { o = new objMatch(); o.TimeNonLive = Time; o.LeaugeName = LeaugeName; o.HomeName = HomeName; o.AwayName = AwayName; o.IdKeo = dataIbetMatch[44]; o.BetType = "7"; o.Keo = dataIbetMatch[45]; o.Odd1 = dataIbetMatch[46]; o.Odd2 = dataIbetMatch[47]; if (dataIbetMatch[48] == "a") { o.Keo = "-" + o.Keo; } o.Keo = UtilSoccer.formatkeo(o.Keo); lst.Add(o); } catch { } ///HTOU/// try { o = new objMatch(); o.TimeNonLive = Time; o.LeaugeName = LeaugeName; o.HomeName = HomeName; o.AwayName = AwayName; o.IdKeo = dataIbetMatch[49]; o.BetType = "9"; o.Keo = dataIbetMatch[50]; o.Odd1 = dataIbetMatch[51]; o.Odd2 = dataIbetMatch[52]; if (dataIbetMatch[48] == "a") { o.Keo = "-" + o.Keo; } o.Keo = UtilSoccer.formatkeo(o.Keo); lst.Add(o); } catch { } } } } catch (Exception) { lst.Clear(); return(lst); } return(lst); }
public List <objMatch> getMatchOddLive() { objMatch o; string data = ""; try { lstLive.Clear(); data = http.Fetch(mainHost + "/UnderOver.aspx?Market=t&DispVer=new", HttpHelper.HttpMethod.Get, mainLink, null); if (data == "") { o = new objMatch(); lstLive.Clear(); o.Score = "Logout"; lstLive.Add(o); login(); return(lstLive); } int ik = data.IndexOf("name=\"k"); int iv = data.IndexOf("value=\"v"); string kIbet = data.Substring(ik + 6, iv - ik - 8); string vIbet = data.Substring(iv + 7, iv - ik - 8); string CT = Util.EscapeDataString(DateTime.Now.AddHours(-11).ToString()); data = http.Fetch(mainHost + "/UnderOver_data.aspx?Market=l&Sport=1&DT=&RT=W&CT=" + CT + "&Game=0&OrderBy=0&OddsType=4&MainLeague=0&DispRang=0&" + kIbet + "=" + vIbet + "&key=dodds&_=1502509515441", HttpHelper.HttpMethod.Get, mainHost + "/UnderOver.aspx?Market=t&DispVer=new", null); string LeaugeName = "", HomeName = "", AwayName = "", Time = "", Score = ""; if (data == "") { o = new objMatch(); lstLive.Clear(); o.Score = "Logout"; lstLive.Add(o); login(); return(lstLive); } else { foreach (Match m in Regex.Matches(data, @"Nl\[\d+\]=\[.*\];")) { string strIbetMatch = m.Value.ToString().Replace("];", ""); strIbetMatch = Regex.Replace(strIbetMatch, @"Nl\[\d+\]=\[", ""); strIbetMatch = strIbetMatch.Replace("'", ""); string[] dataIbetMatch = strIbetMatch.Split(','); if (dataIbetMatch[5] != "") { LeaugeName = UtilSoccer.ChuanTenLeauge_Ibet(dataIbetMatch[5]); } if (LeaugeName.Contains("CORNERS") || LeaugeName.Contains("BOOKING") || LeaugeName.Contains("TEAM") || LeaugeName.Contains("WINNER") || LeaugeName.Contains("MATCH") || LeaugeName.Contains("SPECIFIC") || LeaugeName.Contains("SUBSTITUTION") || LeaugeName.Contains("GOAL KICK") || LeaugeName.Contains("OFFSIDE") || LeaugeName.Contains("THROW IN") || LeaugeName.Contains("FREE KICK") || LeaugeName.Contains("1st HALF vs 2nd HALF") || LeaugeName.Contains("RED CARD") || LeaugeName.Contains("OWN GOAL") || LeaugeName.Contains("PENALTY") || LeaugeName.Contains("TOTAL GOALS MINUTES") || LeaugeName.Contains("Injury")) { continue; } if (dataIbetMatch[6] != "") { HomeName = UtilSoccer.ChuanTenTeam_Ibet(dataIbetMatch[6]); AwayName = UtilSoccer.ChuanTenTeam_Ibet(dataIbetMatch[7]); } if (dataIbetMatch[12] != "") { Time = dataIbetMatch[12].Replace("\\", ""); } if (dataIbetMatch[21] != "" && dataIbetMatch[22] != "") { Score = dataIbetMatch[21] + "-" + dataIbetMatch[22]; } ///FT/// try { o = new objMatch(); o.Score = Score; o.TimeLive = Time; o.LeaugeName = LeaugeName; o.HomeName = HomeName; o.AwayName = AwayName; if (Matchs.Contains(o.HomeName + "-" + o.AwayName) == false) { Matchs += o.HomeName + "-" + o.AwayName + ","; } o.IdKeo = dataIbetMatch[31]; o.BetType = "1"; o.hdp = dataIbetMatch[32]; o.Odd1 = dataIbetMatch[33]; o.Odd2 = dataIbetMatch[34]; if (dataIbetMatch[35] == "a") { o.hdp = "-" + o.hdp; } o.hdp = UtilSoccer.formatkeo(o.hdp); lstLive.Add(o); } catch { } ///OUFT/// try { o = new objMatch(); o.Score = Score; o.TimeLive = Time; o.LeaugeName = LeaugeName; o.HomeName = HomeName; o.AwayName = AwayName; o.IdKeo = dataIbetMatch[36]; o.BetType = "3"; o.hdp = dataIbetMatch[37]; o.Odd1 = dataIbetMatch[38]; o.Odd2 = dataIbetMatch[39]; if (dataIbetMatch[35] == "a") { o.hdp = "-" + o.hdp; } o.hdp = UtilSoccer.formatkeo(o.hdp); lstLive.Add(o); } catch { } ///HT/// try { o = new objMatch(); o.Score = Score; o.TimeLive = Time; o.LeaugeName = LeaugeName; o.HomeName = HomeName; o.AwayName = AwayName; o.IdKeo = dataIbetMatch[44]; o.BetType = "7"; o.hdp = dataIbetMatch[45]; o.Odd1 = dataIbetMatch[46]; o.Odd2 = dataIbetMatch[47]; if (dataIbetMatch[48] == "a") { o.hdp = "-" + o.hdp; } o.hdp = UtilSoccer.formatkeo(o.hdp); lstLive.Add(o); } catch { } ///HTOU/// try { o = new objMatch(); o.Score = Score; o.TimeLive = Time; o.LeaugeName = LeaugeName; o.HomeName = HomeName; o.AwayName = AwayName; o.IdKeo = dataIbetMatch[49]; o.BetType = "9"; o.hdp = dataIbetMatch[50]; o.Odd1 = dataIbetMatch[51]; o.Odd2 = dataIbetMatch[52]; if (dataIbetMatch[48] == "a") { o.hdp = "-" + o.hdp; } o.hdp = UtilSoccer.formatkeo(o.hdp); lstLive.Add(o); } catch { } } } } catch (Exception) { o = new objMatch(); lstLive.Clear(); o.Score = "Error"; o.BetType = data; lstLive.Add(o); return(lstLive); } TotalMatch = "IBET MATCH: " + (Matchs.Split(',').Length - 1).ToString(); return(lstLive); }