mrhappyasthma / IsThisStockGood

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

Queries are failing - im guessing morningstar scraping is failing #51

Closed mrhappyasthma closed 2 years ago

mrhappyasthma commented 2 years ago

I noticed that all requests are returning empty data for most requests. I suspect the morningstar scraping is failing.

mrhappyasthma commented 2 years ago

"This report is no longer supported" - https://financials.morningstar.com/finan/financials/getKeyStatPart.html?&t=goog&region=usa&culture=en-US&cur=&order=asc

mrhappyasthma commented 2 years ago

From their website "Key Ratios will be retired soon, please see Key Statistics for content."

mrhappyasthma commented 2 years ago

Looks like the data is now under "trailing returns" tab: https://www.morningstar.com/stocks/xnas/goog/trailing-returns

source: https://betacommunity.morningstar.com/s/question/0D53o000067kDukCAE/key-ratios-page-is-no-longer-available

mrhappyasthma commented 2 years ago

Seems this data come from an API gated by authentication.

mrhappyasthma commented 2 years ago

A potential alternative is a site called stockrow.com. It's US companies only, but seems to have a json API with similar 10 years of data: https://stockrow.com/api/companies/GOOG/new_key_stats.json

mrhappyasthma commented 2 years ago

Fixed in https://github.com/mrhappyasthma/IsThisStockGood/commit/56982726d5105d18b97903097e32ccd4295a2d13