From 91040d08d4fbea023dfdc7ac9f75f5ccf82bc54d Mon Sep 17 00:00:00 2001 From: Tom Coombs Date: Sun, 15 Sep 2024 13:36:28 -0400 Subject: [PATCH] trying different user agent --- Features/Routes/Services/FlightAwareRouteService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Features/Routes/Services/FlightAwareRouteService.cs b/Features/Routes/Services/FlightAwareRouteService.cs index ad68b44..b5784b8 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 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"); + 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"); await using var stream = await client.GetStreamAsync(MakeUrl(departureIcao, arrivalIcao)); var parser = new HtmlParser(); using var document = await parser.ParseDocumentAsync(stream);