The following function in Google Sheets worked until last Friday:
=index(IMPORTHTML("https://finance.yahoo.com/quote/"&B1&"/key-statistics?p="&B1&"","table", 2),5,2)
This function would go to the statistics section in Yahoo Finance and extract the Market Cap from a stock. It stopped working today and I'm not sure why.
I tried using the following command in the Chrome console to get the table number and played with the table indices for the IMPORTHTML function but no luck:
var i = 1; [].forEach.call(document.getElementsByTagName("table"),
function(x) { console.log(i++, x); });
Did Yahoo do something to make this no longer work? OR are my indices just wrong now?
AAPL = Apple
. Is my understanding correct? And, can I ask you about the result values you want? Unfortunately, I cannot understand about it from your replying. I apologize for this. – Tanaike