Small refactor for readability.

This commit is contained in:
2024-02-10 22:36:20 +00:00
parent 3fd0218db3
commit df616fd42c

View File

@@ -4,6 +4,9 @@ namespace lottery_co_uk_scraper.Utilities
{
internal partial class URLExtractor
{
[GeneratedRegex(@"<a\s+href=""([^""]+)""")]
private static partial Regex MyRegex();
public static async Task<List<string>> ExtractUrlsAsync(string url)
{
List<string> urls = [];
@@ -17,7 +20,7 @@ namespace lottery_co_uk_scraper.Utilities
{
string capturedUrl = match.Groups[1].Value;
if (capturedUrl.StartsWith(""))
if (capturedUrl.StartsWith("") || capturedUrl.StartsWith(""))
{
string modifiedUrl = "" + capturedUrl;
urls.Add(modifiedUrl);
@@ -28,8 +31,5 @@ namespace lottery_co_uk_scraper.Utilities
return urls;
}
[GeneratedRegex(@"<a\s+href=""([^""]+)""")]
private static partial Regex MyRegex();
}
}