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.

Written by

Software architect, startup adviser. Editor of https://medium.com/applaudience. Founder of https://go2cinema.com.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store