使用 ImportXML() 在 google 电子表格中检索股票 "change in percentage"

Retrieve stock "change in percentage" in google spreadsheet with ImportXML()

我想通过 ImportXML() 函数在 Google 电子表格中检索股票数据。

假设我想检索 SHA:000001 的股票数据 要检索价格,使用的公式是;

=ImportXML("https://www.google.com/finance?q=SHA:000001", "//span[@class='pr']")

用于检索当天 "price change in percentage" 的公式是什么?

这对我有用:

=ImportXML("https://www.google.com/finance?q=SHA:000001", "//div[@class='id-price-change nwp']/span/span[2]")