Scraping prices from walmart.com

WP Intense Q & ACategory: Price Comparison ProScraping prices from walmart.com
phopinder pannu asked 5 months ago

Hi

We are having difficulty scraping prices from walmart.com. The xPath works in our spreadsheet (that uses the ImportFromWeb add-on for Chrome) but the same doesn;t seem to work in your plugin. We've also not been able to get it using the CSS selector. Both types return a 444 error. We've tried the following amongst other variations:

xPath: //*[@id=”price”]/div/span[1]/span/span[2]

CSS: #price > div > span.hide-content.display-inline-block-m > span > span.visuallyhidden

Here is an example of a URL that we would like to scrape the price from:

https://www.walmart.com/ip/2004-W-4-Coin-Proof-American-Gold-Eagle-Coin-Set-w-Box-COA/839202624

Note that the other sites we've scraped have worked ok - it just seems to be Walmart that we are struggling with!

Kind regards

Matt

1 Answers
Dave Hilditch Staff answered 5 months ago

Just #price is enough to identify the price on Walmart. For xPath, you could use //*[id="price"]

Note that those should be ‘straight’ quotes and that editors (including this one on this website) are changing straight quotes to ‘smart’ or ‘curly’ quotes.

Last chance to grab a lifetime unlimited bundle! Ends Cyber Monday

We use cookies

We use cookies for various things on our site, including our on-site chat bubble (if you use it), our comment forms (if you use them) and for session handling (if you log in).

Other than that, we use cookies to identify where traffic came from to help us understand which traffic turns into sales, we use a cookie for Google Analytics traffic analysis and we use a cookie to customise adverts for our own products we think you'll be interested in.

You can read more detail in our privacy policy page. Please click 'Accept' or 'Decline' to continue.