Small refactor for readability.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user