CSS selectors not working

Rebecca G. asked 4 years ago

Hi,

I don’t know where i’m going wrong with the CSS selectors. I used this article https://www.superspeedyplugins.com/knowledgebase/how-to-identify-css-selectors-to-identify-retail-sale-prices/ and have tried both widgets to find the CSS selector and also tried Xpath. I’ve tried a few more websites to practice finding these selectors. I was successful in getting it working for John Lewis and you got Garmin and Amazon to work by using the scraper API license . Other websites I tried were Fitbit, Argos and Curry’s and I can’t figure out why they’re not scraping. I’ve tried different settings, the tools to find the code and put different codes in and I don’t know where i’m going wrong.

Thanks for any help.

1 Answers
Dave Hilditch Staff answered 4 years ago

I’ll use these 3 URLs as examples:

They’re all for the same product – the Garmin Venu Sq. To test this, I created a page with the following shortcode:

[pricecomparisonpro urls="https://www.argos.co.uk/product/7944499,https://buy.garmin.com/en-US/US/p/707174,https://www.currys.co.uk/gbuk/smart-tech/smart-tech/smart-watches-and-fitness/smart-watches/garmin-venu-sq-light-gold-white-10213611-pdt.html" displaystyle="panel"]

I used CSS selectors for each of these. The CSS selectors I used were these:

* Argos Retail Price: .pdp-right span[data-test="price-was"], .pdp-right h2

* Argos Sale Price: .pdp-right h2

* Garmin Retail price: js__product__price__discount, #js__product__price__main

* Garmin Sale price: js__product__price__main

* Currys Retail price: .prd-past-amounts span[data-key="was-price"], .prd-amounts .current

* Currys Sale: .prd-amounts .current

Here’s a screenshot:

https://i.imgur.com/jW7turW.png

Here’s the link to the live demo I made for you:

https://foundthru.com/fitbit-argos-currys-price-comparison-pro-demo/

Your Answer


Super Speedy Plugins
Logo