mrhappyasthma / IsThisStockGood

A tool for evaluating companies using the Rule #1 investing principles.
http://www.isthisstockgood.com
25 stars 12 forks source link

Morningstar csv is no longer working. #8

Closed mrhappyasthma closed 5 years ago

mrhappyasthma commented 5 years ago

Seems like they updated the csv downloads to be dynamically generated such that they cannot be requested via urlfetch.

A workaround might be with the following JSONP queries:

Key Ratios: https://financials.morningstar.com/finan/financials/getKeyStatPart.html?&t=AAPL&region=usa&culture=en-US&cur=&order=asc

https://financials.morningstar.com/finan/financials/getFinancePart.html?&t=AAPL&region=usa&culture=en-US&cur=&order=asc

mrhappyasthma commented 5 years ago

Income statement (is), Balance sheet (bs), and cash flow (cf)

http://financials.morningstar.com/ajax/ReportProcess4HtmlAjax.html?&t=AAPL&region=usa&culture=en-US&reportType=is&period=12&dataType=A&order=asc&columnYear=5&curYearPart=1st5year&rounding=3

mrhappyasthma commented 5 years ago

Workaround in place as of https://github.com/mrhappyasthma/IsThisStockGood/commit/529e96f99df1668d880e3b6701a44d94adcdf99b

It's fragile but it seems to be working as intended.