diff --git a/Features/Routes/Services/FlightAwareRouteService.cs b/Features/Routes/Services/FlightAwareRouteService.cs index b5784b8..ad68b44 100644 --- a/Features/Routes/Services/FlightAwareRouteService.cs +++ b/Features/Routes/Services/FlightAwareRouteService.cs @@ -25,7 +25,7 @@ public async Task FetchRoutesAsync(string departureIcao // Open FlightAware IFR routing page var client = httpClientFactory.CreateClient(); - client.DefaultRequestHeaders.UserAgent.TryParseAdd("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36");//Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"); + client.DefaultRequestHeaders.UserAgent.TryParseAdd("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"); await using var stream = await client.GetStreamAsync(MakeUrl(departureIcao, arrivalIcao)); var parser = new HtmlParser(); using var document = await parser.ParseDocumentAsync(stream); diff --git a/Features/Routes/UI/Pages/Routes.razor b/Features/Routes/UI/Pages/Routes.razor index a7d850e..2f74841 100644 --- a/Features/Routes/UI/Pages/Routes.razor +++ b/Features/Routes/UI/Pages/Routes.razor @@ -177,12 +177,12 @@ && r.ArrivalAirportRegex.IsMatch(arrivalIcao)); _showFlightAwareLoading = true; - try - { - _displayedFlightAwareRoutes = await FlightAware.FetchRoutesAsync(departureIcao, arrivalIcao); - _isFlightAwareError = false; - } - catch (Exception) + //try + //{ + //_displayedFlightAwareRoutes = await FlightAware.FetchRoutesAsync(departureIcao, arrivalIcao); + // _isFlightAwareError = false; + //} + //catch (Exception) { _displayedFlightAwareRoutes = null; _isFlightAwareError = true;