

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Concurrency
incomplete
2: Max Pages
incomplete
This lesson's interactive features are locked, please to keep using them
As it stands, our crawler is only useful on fairly small sites. Sites with thousands or hundreds of thousands of pages take too long to crawl.
Google's crawlers run concurrently on fleets of servers to crawl the majority of the internet. You might not have that kind of budget for this project.
Let's add a maxPages setting so that we can crawl even gigantic websites and have our tool automatically stop when it's done a reasonable amount of work.
shouldStop = true"Reached maximum number of pages to crawl."false# usage: npm run start <URL> <maxConcurrency> <maxPages>
npm run start https://learnwebscraping.dev/practice/ecommerce/ 3 10
Make sure that your program prints a line to the console each time you crawl a page, as well as once per page in the report. This will help you see what your crawler is doing, and ensure you can kill it with Ctrl+C if it's stuck in a loop or spamming requests.
Run and submit the CLI tests.