learn / Term explained
EN

Collection basics · Terminology explanation

Pagination

Pagination

Common writing methods: page turning, cursor paging, infinite scrolling

What it means

Fetching successive batches of records using a site's pagination mechanism, such as page numbers, next-page links, cursors or scrolling.

Different paging mechanisms require different next-step judgments. The page number type can expose the page number, the cursor type usually needs to use the cursor returned in the previous batch, and infinite scrolling may trigger new data requests due to page interaction.

Pagination must define stopping conditions and take into account duplicate records and data updates. When the order of web pages changes during the collection process, simply recording the page number may not guarantee that there are no duplications or omissions of data.

In a scraping task

Follow next page link

After parsing the current list, check whether there is a valid next page link; if so, continue the request, if not, end. Don’t assume that just because the first page has 20 records, every subsequent page will have 20 records.

Common misconceptions

  • Pagination does not necessarily mean modifying the page parameter in the URL.
  • When there is no new content on the page, you should check the end condition and loading status instead of infinitely repeating clicks.

References

Organized by Northleaf Studio. The source link retains the original address to facilitate continued reading.

Back to glossary