Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling investmentType queries in Morningstar #30

Open
ndfred opened this issue Oct 14, 2020 · 1 comment
Open

Handling investmentType queries in Morningstar #30

ndfred opened this issue Oct 14, 2020 · 1 comment

Comments

@ndfred
Copy link

ndfred commented Oct 14, 2020

I have this strange fund pension fund:
https://www.morningstar.co.uk/uk/snapshot/snapshot.aspx?id=VAUSA0KKID&investmentType=SA

If I call muFunds("nav","VAUSA0KKID","morningstar-uk") I get a TypeError: No se puede llamar al método "getDescendants" de undefined. (line 33). error. Digging through the code it looks like muFund does not handle queries with that require a investmentType parameter, which is the case here. I also see that this fund is shown as GBX when really it is trading GBP.
Did you come across such strange fund pages? I am happy to add some custom parsing code to my sheet and not go through muFunds, but thought I'd ask if this could be fully supported.
And thanks for building this!

@ndfred
Copy link
Author

ndfred commented Oct 14, 2020

I managed to grab the NAV value this way if people want to get around this issue:

=INDEX(SPLIT(INDEX(IMPORTHTML("https://www.morningstar.co.uk/uk/snapshot/snapshot.aspx?id=VAUSA0KKID&investmentType=SA","table",4),2,3), " "), 2)

The table index is a little hacky, but easy to fix if it breaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant