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.

Merge branch 'master' into fix/464-requestTimeoutSecs

Petr Patek5a8fc4647050
diff --cc test/crawlers/cheerio_crawler.js
index 49b82772c,1c59ec0e2..4d4e8f4cb
--- a/test/crawlers/cheerio_crawler.js
+++ b/test/crawlers/cheerio_crawler.js
@@@ -110,11 -125,18 +125,23 @@@ describe('CheerioCrawler', () =>
res.send('DATA');
});
+ app.get('/json-type', (req, res) => {
+ res.json(responseSamples.json);
+ });
+ app.get('/xml-type', (req, res) => {
+ res.type('application/xml');
+ res.send(responseSamples.xml);
+ });
+ app.get('/image-type', (req, res) => {
+ res.type('image/png');
+ res.send(responseSamples.image);
+ });
+
+ app.get('/timeout', async (req, res) => {
+ await delayPromise(32000);
+ res.type('html').send('<div>TEST</div>');
+ });
+
server = await startExpressAppPromise(app, 0);
port = server.address().port; //eslint-disable-line
});