вот часть кода httpResponse = httpRequest.Get("https://аоаоао", null); ListDictionary listDictionary = JsonConvert.DeserializeObject<ListDictionary>(httpResponse.ToText()); HtmlDocument htmlDocument = new HtmlDocument(); htmlDocument.LoadHtml(Conversions.ToString(listDictionary["html"])); arrayList.Clear(); string input = httpResponse.ToText(); game.ID = Regex.Match(input, "xxxxxx_\\d+").ToString() Код httpResponse = httpRequest.Get("https://аоаоао", null); ListDictionary listDictionary = JsonConvert.DeserializeObject<ListDictionary>(httpResponse.ToText()); HtmlDocument htmlDocument = new HtmlDocument(); htmlDocument.LoadHtml(Conversions.ToString(listDictionary["html"])); arrayList.Clear(); string input = httpResponse.ToText(); game.ID = Regex.Match(input, "xxxxxx_\\d+").ToString() в результате получаю game.ID = "" ,а не то значение которое должно быть , что может быть не так,может string input = httpResponse.ToText() не верно,может нужно как то по другому
всем спасибо, код исправил, может и не по вашему главное все работает httpResponse = httpRequest.Get("https://xxxxxxxxxxxx", null); } ListDictionary listDictionary = JsonConvert.DeserializeObject<ListDictionary>(httpResponse.ToText()); HtmlDocument htmlDocument = new HtmlDocument(); htmlDocument.LoadHtml(Conversions.ToString(listDictionary["html"])); arrayList.Clear(); httpResponse.ToText(); try { foreach (HtmlNode htmlNode in htmlDocument.DocumentNode.Elements("ul")) { Network.Game game; try { foreach (HtmlNode htmlNode2 in htmlNode.Elements("li")) { if (Operators.CompareString(htmlNode2.Attributes["class"].Value, "rows3 bold", false) == 0) { game.Сумма = Conversion.Val(htmlNode2.InnerText); game.ID = htmlNode.Id; string id = htmlNode.Id; game.ID = Regex.Match(id, "\\d+").ToString(); } else if (Operators.CompareString(htmlNode2.Attributes["class"].Value, "rows1", false) == 0) { game.Игрок = htmlNode2.InnerText; } } } finally Код httpResponse = httpRequest.Get("https://xxxxxxxxxxxx", null); } ListDictionary listDictionary = JsonConvert.DeserializeObject<ListDictionary>(httpResponse.ToText()); HtmlDocument htmlDocument = new HtmlDocument(); htmlDocument.LoadHtml(Conversions.ToString(listDictionary["html"])); arrayList.Clear(); httpResponse.ToText(); try { foreach (HtmlNode htmlNode in htmlDocument.DocumentNode.Elements("ul")) { Network.Game game; try { foreach (HtmlNode htmlNode2 in htmlNode.Elements("li")) { if (Operators.CompareString(htmlNode2.Attributes["class"].Value, "rows3 bold", false) == 0) { game.Сумма = Conversion.Val(htmlNode2.InnerText); game.ID = htmlNode.Id; string id = htmlNode.Id; game.ID = Regex.Match(id, "\\d+").ToString(); } else if (Operators.CompareString(htmlNode2.Attributes["class"].Value, "rows1", false) == 0) { game.Игрок = htmlNode2.InnerText; } } } finally