Example #1
0
        static void Main()
        {
            ChromeOptions options = new ChromeOptions();

            options.AddArgument("--mute-audio");
            options.AddArgument("--disable-images");
            //options.AddArgument("--headless");
            //options.AddArgument("-headless");
            ChromeDriverService service = ChromeDriverService.CreateDefaultService();

            service.HideCommandPromptWindow = true;
            driver = new ChromeDriver(service, options);
            api    = new FlashScoreApi
            {
                driver = driver
            };
            for (int i = 0; i < 10; i++)
            {
                Console.WriteLine("\n\n################# Проверка номер {0} #################\n\n", i + 1);
                try
                {
                    StartTest().Wait();
                    Thread.Sleep(1000 * 5);
                    //Console.ReadLine();
                    //Console.ReadLine();
                    // driver.Quit();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                    //driver.Quit();
                }
            }
            Console.ReadLine();
        }
Example #2
0
        async static void Test()
        {
            FlashScoreApi FlashScore = new FlashScoreApi();
            var           matches    = await FlashScore.GetAllMatchesAsync(DayInfo.Today);

            var info = await matches.GetInfoAsync(true, true, true, true);

            foreach (var match in info)
            {
                string test = "";

                test += "name: " + match.Match.Name + " | " +
                        "time: " + match.Match.DateStart + " | " +
                        "liga: " + match.Match.Liga + " | " +
                        "link: " + match.Link + " | ";

                //foreach (var matchTotal in match.Coefficient.BM)
                //{
                //    test += "key:" + matchTotal.Total + "\n";
                //    test += "bk:" + matchTotal.BkName + "\n";
                //    test += "more:" + matchTotal.More + "\n";
                //    test += "less:" + matchTotal.More + "\n";
                //}
                Console.WriteLine(test + "\n");
            }
        }
Example #3
0
        public async Task Get_All_Math()
        {
            FlashScoreApi flashApi = new FlashScoreApi();

            var allMatch = await flashApi.GetAllMatchesAsync();

            Debug.WriteLine("get all match");
        }
Example #4
0
        public async Task Get_All_Match_Info()
        {
            FlashScoreApi flashApi = new FlashScoreApi();

            var allMatch = await flashApi.GetAllMatchesAsync();

            Debug.WriteLine("get all match");

            await allMatch.GetInfoAsync(true, true, true, true);

            Debug.WriteLine("get all match info");
        }