Incredible but Yahoo has retired its widely used ichart service.
See here: https://yahoo.uservoice.com/forums/382977-finance/suggestions/19310356-https-ichart-finance-yahoo-com-table-csv-s-spy-a?page=1&per_page=20.
For a long time there were three ways to get EOD data out of Yahoo:
1. Scrape from the a stocks’ HistoricalData HTML page which is still possible
2. Press the download button on a stocks’ HistoricalData page which is still possible
3. Use the ichart API, which has been stopped.
These three methods resulted in different data sets. The first used to be great a long time ago but gradually contained more and more artifacts (non-corrected splits and no dividends added in the adjusted close column. You would assume that 2 and 3 would give identical csv files but that was not the case, neither were 1 and 2 identical.
In fact, only the third method was top-class. I used this to download hundreds of stock, ETF and mutual fund symbols each day and only seldom found discrepancies with other reliable data sources (like those on seekingalpha). I checked on a regular basis that this API method gave total returns, so dividends were injected in the curve and that was the case until they closed it down three days ago.
To see how bad the first two methods are, just got to symbol SPXL, that had a split on 1 May 2017 and see on the screen and in the downloaded file that the data has not been corrected.
Yahoo/Verizon have no intention to re-institute the service, unlike the message they are now displaying. This is the end of a highly respected and heavily used Yahoo service that cannot be replaced easily by any free source that I know of.