I try to print historic adjusted close prices from Yahoo finance to Google Sheets.
=ImportXML("https://sg.finance.yahoo.com/quote/"&B57&"/history?p="&B57, "//tbody/tr[21]/td[6]")
Cell B57
is for example "SPY"
.
This works fine for historic prices up to 100 days. (it is adjusted here: tr[100]
)
When I try to get prices later 100 days it returns "N/A".
These prices are visible on yahoo finance.
It there a way to adjust XPATH
that it works?
I noticed, that in the html code of yahoo pices about 100 days don't have this "data-reactid=1520" in the tr
tag.
Thanks in advance!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…