Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

docs: fix `skip-navigation` example (#1529)

Szymon Marczak3fc1951d79ab
diff --git a/docs/examples/skip-navigation.ts b/docs/examples/skip-navigation.ts
index cfeddce76..0bbde53c1 100644
--- a/docs/examples/skip-navigation.ts
+++ b/docs/examples/skip-navigation.ts
@@ -8,10 +8,10 @@ const crawler = new PlaywrightCrawler({
// The request should have the navigation skipped
if (request.skipNavigation) {
// Request the image and get its buffer back
- const imageBuffer = await sendRequest({ responseType: 'buffer' });
+ const imageResponse = await sendRequest({ responseType: 'buffer' });
// Save the image in the key-value store
- await imageStore.setValue(`${request.userData.key}.png`, imageBuffer);
+ await imageStore.setValue(`${request.userData.key}.png`, imageResponse.body);
// Prevent executing the rest of the code as we do not need it
return;