Skip to content

Scraping prices from

This website is fairly easy to scrape from. If you understand how CSS works, right click the price on a product page and you’ll find a suitable CSS selector.

Otherwise, you can install the SelectorGadget Chrome Extension and click the price and you should see something like this image:

So, in this case with there are actually a few options. If you click the price with the SelectorGadget extension you may need to click around the price – to the left or the right – to highlight a container of the price to get a suitable CSS selector that matches only 1 item.

With you could use any of these CSS selectors to grab the retail price:

  • .price-block__highlight
  • .promo-price
  • .price-block

Price Comparison Pro is smart enough to exclude HTML from inside the selector and just grab the price, providing there is only 1 matched item and there is only 1 price within that matched item.

If there are more than 1 matched items, it will grab the first one.

Note: If you need to, you can actually add multiple selectors inside Price Comparison Pro separated by commas. For example, if you’re uncertain of whether the .promo-price will always be available, you could set the price selector to use all 3 of the selectors above by entering the price selector as:

.price-block__highlight, .promo-price, .price-block

Adding multiple CSS selectors is also useful when not all pages on your target website use the same HTML structure. For example, a different CSS class may be used for the retail price when the product is on sale. In that case, you’d use the standard price CSS selector, then a comma, then have the CSS selector to grab the retail price when the product is on sale – it will typically have a strikethrough effect going through it to show you how much you’re saving.

Did this article answer your question?

Leave a Reply

Your email address will not be published.

Come chat to me on our Discord server to ask questions - Dave Hilditch, WP Intense

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.