Reputation: 2787
I'm trying to complete a IMPORTXML function that targets a <meta>
tag and it's content=
value. I'm not a developer and I know I'm missing something basic, but I can't figure it out. Any help is greatly appreciated.
Partial IMPORTXML Function
I believe this function gets to the level containing the tag I'm trying to pull.
=IMPORTXML("https://www.officedepot.com/a/products/273646","//div[@id='skuActions']//table//tr[@id='trOneTimeDeliv']/td")
I'm trying to pull the content value of $34.99 out of the tag below.
<meta itemprop="price" content="$34.99" />
It is found in the URL below
https://www.officedepot.com/a/products/273646/Office-Depot-Brand-White-Copy-Paper/
Upvotes: 0
Views: 581
Reputation: 201358
Although I'm not sure whether this is what you want, how about this? https://www.officedepot.com/a/products/273646/Office-Depot-Brand-White-Copy-Paper/
is in a cell "A1".
=IMPORTXML(A1,"//meta[@itemprop='price'][1]/@content")
=IMPORTXML(A1,"//td[@class='border_bottom'][3]//div[@class='unified_price_row unified_sale_price red_price']//span[@class='price_column right']")
If I misunderstand your question, I'm sorry.
Upvotes: 2