Element selector

Record wrappers

The Element selector returns each matched wrapper as a parent context for its child selectors. It is the standard way to group fields from repeated items in the same output record.

Configuration

  • Selector - CSS selector for the repeated wrapper elements.
  • Multiple - Enable for repeated records. Child field selectors normally return one value per wrapper.
  • Scroll - Scroll the page to load additional matching elements.
  • Element limit - Optional maximum number of elements returned while scrolling.

Example

_root
└── product
    ├── name
    ├── price
    └── image

Fig. 1: Multiple items selected with element selector

Scrolling

Enable scrolling when the website appends records as the viewport moves down. The scraper stops when it can no longer discover new matching elements or when the configured element limit is reached.

Common errors

  • Selecting the field instead of the common record wrapper.
  • Disabling Multiple when multiple elements need to be collected from the same page.
  • Using scrolling where the page requires a Load more click.

Related

Related videos