
Puppeteer Scraper
Pricing
Pay per usage

Puppeteer Scraper
Crawls websites with the headless Chrome and Puppeteer library using a provided server-side Node.js code. This crawler is an alternative to apify/web-scraper that gives you finer control over the process. Supports both recursive crawling and list of URLs. Supports login to website.
5.0 (5)
Pricing
Pay per usage
139
Total users
6.7k
Monthly users
849
Runs succeeded
>99%
Issue response
3.7 days
Last modified
21 days ago
ArgumentError: Did not expect 'exclude' property during pagination
Open
Hi,
I am encountering a persistent error when using the Puppeteer Scraper to handle pagination on search results pages from a real estate website.
My pageFunction successfully extracts data from the first results page of this website. The website uses pagination where results are split across multiple pages.
I have configured the scraper to handle this pagination using:
A Pseudo-URL pattern that matches the structure of subsequent pages, which include parameters indicating the result offset (pattern example structure: .../[ParamName\d+_OtherText]*). A Clickable elements selector identifying the "Next page" button (button.andes-pagination__button--next). However, the scraper consistently fails after successfully processing the first page, specifically during the process of handling links and attempting to go to the next page. The error message in the logs is always: ArgumentError: Did not expect property exclude to exist, got `` in object options
This error suggests that an exclude property with an empty string value ('') is being passed to the internal function that handles adding new requests (like enqueueLinksByClickingElements), and this is causing the failure.
Troubleshooting Steps Taken:
I resolved an initial SyntaxError in the pageFunction code. I resolved an issue where the scraper was getting stuck during initialization (possibly proxy/network related). To address the ArgumentError, based on the error message and suggestions received from Apify support: I checked the "Exclude Glob Patterns" field in the "Basic configuration" UI; it appears visually empty. I explicitly added "excludes": [] to the scraper's JSON configuration to ensure an empty exclusion array is passed. Despite adding "excludes": [] to the JSON configuration, the scraper still fails with the exact same ArgumentError when attempting pagination after the first page. This was confirmed across multiple runs. The issue seems to be related to an empty exclude property being passed internally during link handling, even though it's not configured this way in the UI or explicitly set as an empty array in the JSON.
Could the development team please investigate why this ArgumentError occurs despite the configuration settings and provide guidance on how to properly handle pagination on such websites without this error?
I can provide the full log output from a recent run exhibiting this error and the exact JSON configuration used if needed (or it may be linked via the Actor run URL).
Thank you for your help.