Apify Discord Mirror

N
Nth
Offline, last seen 4 days ago
Joined January 10, 2025
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; }, }); });
1 comment
R
I want to use the AdaptivePlaywrightCrawler, but it seems like it wants to crawl the entire web.
Here is my code.

const crawler = new AdaptivePlaywrightCrawler({ renderingTypeDetectionRatio: 0.1, maxRequestsPerCrawl: 50, async requestHandler({ request, enqueueLinks, parseWithCheerio, querySelector, log, urls }) { console.log(request.url, request.uniqueKey); await enqueueLinks(); } }); crawler.run(['https://crawlee.dev']);
3 comments
N
E