diff --git a/Overflow/SouthernWater/SouthernWaterApi.cs b/Overflow/SouthernWater/SouthernWaterApi.cs index 5d62128..8436bae 100644 --- a/Overflow/SouthernWater/SouthernWaterApi.cs +++ b/Overflow/SouthernWater/SouthernWaterApi.cs @@ -22,7 +22,7 @@ public partial class SouthernWaterApi _logger = logger; } - [GeneratedRegex(@".*const APIURL = '(?.*)'.*\n.*const APIGWKEY = '(?.*)'.*", RegexOptions.IgnoreCase)] + [GeneratedRegex(@".APIURL=""(?.*)"".*APIGWKEY=""(?.*?)"".*", RegexOptions.IgnoreCase)] private static partial Regex ApiUrlAndKey(); public async Task LoadApiUrl() @@ -67,11 +67,13 @@ public partial class SouthernWaterApi if (apiUrlFound) { baseUrl = apiUrl.Value; + _logger.LogInformation("API url found [{APIUrl}]", apiUrl); } if (apiKeyFound) { this.apiKey = apiKey.Value; + _logger.LogInformation("API key found [{APIKey}]", apiKey); } } catch (HttpRequestException e)