diff --git a/lottery-co-uk-scraper/NationalLottery/DrawWinnerInformation.cs b/lottery-co-uk-scraper/NationalLottery/DrawWinnerInformation.cs index 5231409..1a1ea49 100644 --- a/lottery-co-uk-scraper/NationalLottery/DrawWinnerInformation.cs +++ b/lottery-co-uk-scraper/NationalLottery/DrawWinnerInformation.cs @@ -1,6 +1,5 @@ using HtmlAgilityPack; using lottery_co_uk_scraper.core.Models; -using static lottery_co_uk_scraper.NationalLottery.Lotto; using System.Globalization; using lottery_co_uk_scraper.Utilities; using System.Text.RegularExpressions; @@ -9,6 +8,25 @@ namespace lottery_co_uk_scraper.NationalLottery { internal partial class DrawWinnerInformation { + [GeneratedRegex(@"(\d+)")] + private static partial Regex MyRegex(); + + internal static class LotteryTableRow + { + internal const string Match2 = "Match 2"; + internal const string Match3 = "Match 3"; + internal const string Match4 = "Match 4"; + internal const string Match5 = "Match 5"; + internal const string Match5Bonus = "Match 5 plus Bonus"; + internal const string Match6 = "Match 6"; + internal const string Total = "Totals"; + internal const string Winners = "Winners"; + internal const string PrizePerWinner = "Prize Per Winner"; + internal const string PrizeFundAmount = "Prize Fund Amount"; + internal const string BallSetUsed = "ballSetUsed"; + internal const string BallsDrawn = "ballsDrawn"; + } + public static void ProcessTableSection(HtmlNode table, string sectionTitle, LottoResult lottoResult) { try @@ -51,6 +69,7 @@ namespace lottery_co_uk_scraper.NationalLottery } } + private static HtmlNode GetSectionRowByTitle(HtmlNode table, string sectionTitle) { try @@ -544,8 +563,5 @@ namespace lottery_co_uk_scraper.NationalLottery { AssignValueToModelProperty(sectionTitle, columnTitle, LotteryTableRow.Total, winnersNode, lottoResult); } - - [GeneratedRegex(@"(\d+)")] - private static partial Regex MyRegex(); } } \ No newline at end of file diff --git a/lottery-co-uk-scraper/NationalLottery/Lotto.cs b/lottery-co-uk-scraper/NationalLottery/Lotto.cs index 1ea6df0..b110f41 100644 --- a/lottery-co-uk-scraper/NationalLottery/Lotto.cs +++ b/lottery-co-uk-scraper/NationalLottery/Lotto.cs @@ -37,21 +37,5 @@ namespace lottery_co_uk_scraper.NationalLottery Console.WriteLine($"An error occurred: {ex.Message}"); } } - - public static class LotteryTableRow - { - public const string Match2 = "Match 2"; - public const string Match3 = "Match 3"; - public const string Match4 = "Match 4"; - public const string Match5 = "Match 5"; - public const string Match5Bonus = "Match 5 plus Bonus"; - public const string Match6 = "Match 6"; - public const string Total = "Totals"; - public const string Winners = "Winners"; - public const string PrizePerWinner = "Prize Per Winner"; - public const string PrizeFundAmount = "Prize Fund Amount"; - public const string BallSetUsed = "ballSetUsed"; - public const string BallsDrawn= "ballsDrawn"; - } } } \ No newline at end of file