Skip to content

Commit

Permalink
trying different user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcoombs2000 committed Sep 15, 2024
1 parent f3d193c commit 91040d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Features/Routes/Services/FlightAwareRouteService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public async Task<AirportPairRouteSummary> 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);
Expand Down

0 comments on commit 91040d0

Please sign in to comment.