Example #1
0
        static void handleSchedule(Options opts)
        {
            string html;

            if (string.IsNullOrEmpty(opts.inputHtml))
            {
                html = ScheduleParser.FetchScheduleHtml(opts.inputURL);
            }
            else
            {
                html = System.IO.File.ReadAllText(opts.inputHtml);
            }
            var games = ScheduleParser.GamesScheduleFromHtml(html);
            //var games = ScheduleParser.GamesScheduleFromDailyHtml(html);
        }
Example #2
0
        static void handleResults(Options opts)
        {
            string html;

            if (string.IsNullOrEmpty(opts.inputHtml))
            {
                if (!string.IsNullOrEmpty(opts.inputURL))
                {
                    html = ScheduleParser.FetchScheduleHtml(opts.inputURL);
                }
                else
                {
                    html = ResultsParser.FetchResultsHtml(DateTime.Now.AddDays(1));
                }
            }
            else
            {
                html = System.IO.File.ReadAllText(opts.inputHtml);
            }
            var gameResults = ResultsParser.GamesResultsFromHtml(html);
        }