Text selector returning "null"

Describe the problem.

text selector is returning "null" instead of the product price (attached is a file showing the price column with "null" in the cell).

Url: [https://www.wheelership.com/wholesale/store/wheels.html]

Sitemap:
{"_id":"wheelershipscrape","startUrl":["https://www.wheelership.com/wholesale/store/wheels.html"],"selectors":[{"id":"product wrapper","type":"SelectorElementClick","parentSelectors":["_root"],"selector":".with-facets > div:nth-of-type(2)","multiple":false,"delay":"500","clickElementSelector":"a.ais-pagination--link","clickType":"clickOnce","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueText"},{"id":"product links","type":"SelectorLink","parentSelectors":["product wrapper"],"selector":"a.result","multiple":true,"delay":0},{"id":"SKU","type":"SelectorText","parentSelectors":["product links"],"selector":"span.sku","multiple":false,"regex":"","delay":0},{"id":"QTY","type":"SelectorText","parentSelectors":["product links"],"selector":"span.availability","multiple":false,"regex":"","delay":0},{"id":"price","type":"SelectorText","parentSelectors":["product links"],"selector":"span#product-price-1299","multiple":false,"regex":"","delay":0}]}

The selector you are using, span#product-price-1299 is too specific because this site changes the number for every product. So it would only work for that one product. You can improve it by changing it to:
span[id^='product-price']

If you want to avoid scraping the text "Your price" as seen when there is a discount, you can narrow the selector down by using:
span[id^='product-price'] > span.price

Ref: https://www.w3schools.com/cssref/css_selectors.asp

1 Like

Thank you, that worked!