This is a lightweight app of less than 200 line code to download stock historical data from Yahoo Finance. Given this app uses a reverse engineered API endpoint it may cease working at any time. The app is provided as is and accuracy of the downloaded data cannot be guaranteed.
The app is written in .NET Core as a console app. it should work out of the box in Visual Studio 2017 and above.
Sample CSV export: TBYahooFinanceStockHistory-2020-03-31.csv