Skip to content

Commit

Permalink
Merge pull request #60 from tranb3r/fix59
Browse files Browse the repository at this point in the history
Fixed too many requests error caused by missing user agent header
  • Loading branch information
sergemat authored Aug 5, 2023
2 parents d1e1092 + 2943152 commit abacb24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions YahooFinanceApi/YahooFinanceApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<PackageId>YahooFinanceApi</PackageId>
<PackageTags>Yahoo;Finance;Stock;Quote;Eod;Dividend;Split</PackageTags>
<PackageReleaseNotes>
[8/05/2023] Fixed too many requests error caused by missing user agent header
[5/29/2023] Fixed approach to auth cookie and updated all dependencies
[12/2/2019] Added post market fields (by @KrisSiegel)
[16/9/2018] Upgrade CsvHelper from 6.0.2 to 7.1.1
Expand Down
1 change: 1 addition & 0 deletions YahooFinanceApi/YahooSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public static async Task InitAsync(CancellationToken token = default)

_crumb = await "https://query1.finance.yahoo.com/v1/test/getcrumb"
.WithCookie(_cookie.Name, _cookie.Value)
.WithHeader(userAgentKey, userAgentValue)
.GetAsync(token)
.ReceiveString();

Expand Down

0 comments on commit abacb24

Please sign in to comment.