Apify Discord Mirror

Updated last month

Is there a way to get the number of enqueued links?

At a glance

The community member has provided code for an AdaptivePlaywrightCrawler and wants to log the number of enqueued links after calling enqueueLinks. In the comments, another community member suggests that the information can be obtained from the object returned by the enqueueLinks function, and provides a link to the relevant API documentation.

Useful resources
I have the following code for AdaptivePlaywrightCrawler and I want to log the number of enqueued links after calling enqueueLinks.

router.addDefaultHandler(async ({ request, enqueueLinks, parseWithCheerio, querySelector, log, page }) => { await enqueueLinks({ strategy: 'same-domain', globs: globs, transformRequestFunction: (request) => { return request; }, }); });
R
1 comment
hey, you can get that from the object that is returned by the function: https://crawlee.dev/api/types/interface/BatchAddRequestsResult
Add a reply
Sign up and join the conversation on Discord