我正在尝试将当前股价数据从 ASX 抓取到 Google 电子表格中。
我不使用=googlefinance("ASX.NEA","price")
瞬时延迟价格,因为分辨率四舍五入便士股票的价值。
我没有使用=INDEX(googlefinance("ASX.NEA","price", today()-10, today()),2,2)
历史价格,即使分辨率价格准确,也无法获得当前价格。
网址:
https://www.asx.com.au/asx/share-price-research/company/NEA
xpath(xPath 查找器):
/html/body/section[3]/article/div[1]/div/div/div[4]/div[1]/div[1]/company-summary/table/tbody/tr[1]/td[1]/span
方程:
=IMPORTXML(url, xpath)
结果:#N/A 错误导入的内容为空
我尝试过的其他 xpath 是:
- 路径:
//table/tbody//span
- 路径:
//span[@ng-show="share.last_price"]
- 路径:
//span[@ng-show="share.last_price"]
当我查看页面源代码时,最新的股价是通过 javascript 加载的。
示例:股价为 0.910