简体   繁体   中英

Google Sheets importXml

I'm trying to target a price on a website using an importXML from Google Sheets. The code I'm targeting looks like:

  <span class="new_price" id="final_price">£29.99</span>

Becuase its inside a class 'new_price' my import isnt working:

  =importXml("http://www.hardware-ironmongers.com/details.aspx?code=7751913"; "//span[@id='final_price']")

Any ideas how to target an ID inside a class?

Cheers

I'm no expert, but this looks like it may put you on the right path:

How to select two attributes from the same node with one expression in XPath?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM