0
votes

I am trying to scrape prices off the Lowe's website but don't think I've been able pinpoint the right xpath for the importxml or I'm just doing it completely wrong.

The URL for ref:

 https://www.lowes.com/search?searchTerm=pliers

=importxml(https://www.lowes.com..., xpath)

I've tried //span[@class='h5 js-price']] and the

//*[@id="product-1115091"]/div/div[2]/div/span xpaths but kept getting an "#N/A" error. Basically just trying to get all prices to spit out.

1

1 Answers

0
votes
//span[contains(@class, 'js-price')]

this is the price tag :

<span class="h5 js-price">$13.98</span>

you can use contains() function in the @class attribute to find the span tag