You have multiple options:

  1. Ignore markup altogether and analyse the rendered content structure.
  2. Structure the queries based on the content you are searching for rather than DOM structure/ CSS selector, e.g. if you are searching to scrape price, search for a text node that starts with the currency symbol.

Tech / Product Founder — building https://contra.com/

Tech / Product Founder — building https://contra.com/