public List <Bet> Parse()
        {
            List <Bet> rezult = new List <Bet>();
            Stopwatch  sw     = new Stopwatch();

            sw.Start();

            if (UsingProxy)
            {
                _req.Proxy = ProxyClient.Parse(ProxyList.GetRnd());
                _req.Proxy.ConnectTimeout   = 1500;
                _req.Proxy.ReadWriteTimeout = 1500;
            }

            var          response = _req.Get($"{_url}live.html").ToString();
            HtmlDocument doc      = new HtmlDocument();

            doc.LoadHtml(response);

            var links = doc.DocumentNode.SelectNodes("//a").Where(x => x.Attributes["href"] != null && x.Attributes["href"].Value.StartsWith("bet.html?hl=")).Select((x => x.Attributes["href"].Value)).ToList();

            List <Task <Bet> > tasks = new List <Task <Bet> >();

            foreach (string link in links)
            {
                Task <Bet> task = Task <Bet> .Factory.StartNew(delegate()
                {
                    try
                    {
                        return(ParsePage(link));
                    }
                    catch (Exception ex)
                    {
#if DEBUG
                        Console.WriteLine("Parimatch.inner: " + ex.Message);
#endif
                        return(null);
                    }
                });

                tasks.Add(task);
            }

            //TODO:Нужно сделать нормальную обработку инфы потоками
            throw new NotImplementedException("Нужно сделать нормальную обработку инфы потоками");
            sw.Stop();
            Console.WriteLine($"Parimatch: {rezult.Count} {sw.Elapsed} мс");
            return(rezult);
        }
        private Bet ParsePage(string href)
        {
#if DEBUGPAGE
            Stopwatch sw = new Stopwatch();
            sw.Start();
#endif
            HttpRequest req = new HttpRequest
            {
                CharacterSet = Encoding.GetEncoding(1251),
                UserAgent    =
                    "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 OPR/42.0.2393.94"
            };
            if (UsingProxy)
            {
                req.Proxy = ProxyClient.Parse(ProxyList.GetRnd());
                req.Proxy.ConnectTimeout   = 1500;
                req.Proxy.ReadWriteTimeout = 1500;
            }

            var response = req.Get($"{_url}{href}").ToString();

            HtmlParser parser = new HtmlParser();

            IHtmlDocument document = parser.Parse(response);
            IElement      oddsList = document.GetElementById("oddsList");
            Bet           bet      = new Bet
            {
                Bookmaker = BookmakerType.Parimatch,
                Site      = "P",
                SportType = SportTypeHelper.Parse(oddsList.Children[0].ChildNodes[1].ChildNodes[2].TextContent),
                Groupe    = oddsList.Children[0].ChildNodes[1].ChildNodes[2].TextContent,
                Time      = "0",
                URL       = href
            };


            List <IElement> tables = document.QuerySelectorAll("div#oddsList div.wrapper > table > tbody").ToList();
            if (tables == null)
            {
                throw new ArgumentNullException("Parimatch: Ошибка получения таблицы со ставками");
            }

            IElement table = tables[1].Children.FirstOrDefault();
            if (table == null)
            {
                throw new ArgumentNullException(nameof(table));
            }



            //тупая система. Иногда есть картинка между командами
            //иногда команды обернуты в доп. теги
            bet.Team1 = table.Children[1].ChildNodes[0].TextContent;
            if (bet.Team1.Contains("угловые"))
            {
                throw new ArgumentException("Parimatch: статика");
            }
            for (int i = 1; i < table.Children[1].ChildNodes.Length; i++)
            {
                if (!String.IsNullOrWhiteSpace(table.Children[1].ChildNodes[i].TextContent))
                {
                    bet.Team2 = table.Children[1].ChildNodes[i].TextContent;
                    break;
                }
            }

            bet.Name = bet.Team1 + " - " + bet.Team2;
            //получаем заголовок таблицы
            //и таблицу
            IElement tableHeader   = tables[0].Children.FirstOrDefault();
            IElement tableMainDesc = tables[1].Children.FirstOrDefault();

            if (tableMainDesc != null)
            {
                tableMainDesc = FixTable(tableMainDesc);
            }


            if (tableHeader == null ||
                tableMainDesc == null ||
                tableHeader.ChildElementCount != tableMainDesc.ChildElementCount)
            {
                throw new ArgumentException("Parimatch main table is corrupt");
            }


            ParseBet(bet, tableHeader, tableMainDesc);



            if (tables.Count == 3)
            {
                IHtmlCollection <IElement> dopTables =
                    tables[2].Children.Where(x => x.Attributes["class"] != null && x.Attributes["class"].Value == "bk")
                    .ToCollection();

                for (int i = 0; i < dopTables.Length; i++)
                {
                    var dopTable = dopTables[i];

                    if (dopTable.TextContent.Contains("Прием ставок приостановлен"))
                    {
                        continue;
                    }
                    dopTable = FixTable(dopTable);
                    if (dopTable.ChildElementCount != tableHeader.ChildElementCount)
                    {
                        throw new ArgumentException();
                    }

                    var dopBet = bet.ShortCopy();

                    var t = dopTable.Children[1].TextContent.Split('-').First();
                    if (dopBet.SportType == SportType.Баскетбол)
                    {
                        if (dopTable.Children[1].TextContent.Contains("половина"))
                        {
                            if (dopTable.Children[1].TextContent.Contains("Первая половина:"))
                            {
                                t = "11";
                            }
                            else if (dopTable.Children[1].TextContent.Contains("Вторая половина:"))
                            {
                                t = "12";
                            }
                        }
                    }

                    var timePart = SportTimePartHelper.Parse(t);

                    if (timePart == SportTimePart.Nan)
                    {
                        continue;
                    }

                    ParseBet(dopBet, tableHeader, dopTable);
                    bet.Parts[timePart] = dopBet;
                }



                if (bet.SportType == SportType.Теннис)
                {
                    foreach (IElement tr in tables[2].Children)
                    {
                        Regex reg = new Regex("Сет . гейм .: победа");
                        if (reg.IsMatch(tr.TextContent))
                        {
                            var     data  = tr.Children[1].Children[0].TextContent.Split(' ');
                            GameBet gmBet = new GameBet();
                            gmBet.Set        = SportTimePartHelper.Parse(data[1]);
                            gmBet.Team1      = bet.Team1;
                            gmBet.Team2      = bet.Team2;
                            gmBet.GameNumber = (TenisGamePart)Enum.Parse(typeof(TenisGamePart), data[3].Replace(":", ""));
                            gmBet.Coef1      = TryFloatParse(tr.Children[1].Children[1].Children[0].Children.FirstOrDefault()?.Children.FirstOrDefault()?.TextContent);
                            if (gmBet.Coef1 != 0)
                            {
                                gmBet.Coef1o = tr.Children[1].Children[1].Children[0].Children[0].Children[0].Id;
                            }
                            gmBet.Coef2 = TryFloatParse(tr.Children[1].Children[2].Children[0].Children.FirstOrDefault()?.Children.FirstOrDefault()?.TextContent);
                            if (gmBet.Coef2 != 0)
                            {
                                gmBet.Coef2o = tr.Children[1].Children[2].Children[0].Children[0].Children[0].Id;
                            }

                            bet.Games.Add(gmBet);
                        }
                    }
                }
            }



#if DEBUGPAGE
            Console.WriteLine(bet);
            Console.WriteLine($"Parimatch pageparse: {href} {sw.Elapsed} мс");
#endif

            return(bet);
        }