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.

fix: correct some typing exports (#1527)

Vlad Frangu4a136e59e128
diff --git a/package-lock.json b/package-lock.json
index 15dc43345..240512055 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16644,6 +16644,7 @@
"@crawlee/types": "^3.0.4",
"@crawlee/utils": "^3.0.4",
"cheerio": "1.0.0-rc.12",
+ "devtools-protocol": "*",
"jquery": "^3.6.0",
"ow": "^0.28.1"
},
@@ -16659,6 +16660,11 @@
}
}
},
+ "packages/puppeteer-crawler/node_modules/devtools-protocol": {
+ "version": "0.0.1040073",
+ "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1040073.tgz",
+ "integrity": "sha512-+iipnm2hvmlWs4MVNx7HwSTxhDxsXnQyK5F1OalZVXeUhdPgP/23T42NCyg0TK3wL/Yg92SVrSuGKqdg12o54w=="
+ },
"packages/templates": {
"name": "@crawlee/templates",
"version": "3.0.4",
@@ -17911,8 +17917,16 @@
"@crawlee/types": "^3.0.4",
"@crawlee/utils": "^3.0.4",
"cheerio": "1.0.0-rc.12",
+ "devtools-protocol": "*",
"jquery": "^3.6.0",
"ow": "^0.28.1"
+ },
+ "dependencies": {
+ "devtools-protocol": {
+ "version": "0.0.1040073",
+ "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1040073.tgz",
+ "integrity": "sha512-+iipnm2hvmlWs4MVNx7HwSTxhDxsXnQyK5F1OalZVXeUhdPgP/23T42NCyg0TK3wL/Yg92SVrSuGKqdg12o54w=="
+ }
}
},
"@crawlee/templates": {
diff --git a/packages/core/src/enqueue_links/shared.ts b/packages/core/src/enqueue_links/shared.ts
index cd66e66bb..088b1d8c5 100644
--- a/packages/core/src/enqueue_links/shared.ts
+++ b/packages/core/src/enqueue_links/shared.ts
@@ -157,7 +157,7 @@ export function createRequests(requestOptions: (string | RequestOptions)[], urlP
return requests;
}
-export function filterRequestsByPatterns(requests: Request[], patterns?: UrlPatternObject[]) {
+export function filterRequestsByPatterns(requests: Request[], patterns?: UrlPatternObject[]): Request[] {
if (!patterns?.length) {
return requests;
}
diff --git a/packages/puppeteer-crawler/package.json b/packages/puppeteer-crawler/package.json
index 710e8f1f8..77bc80f75 100644
--- a/packages/puppeteer-crawler/package.json
+++ b/packages/puppeteer-crawler/package.json
@@ -60,6 +60,7 @@
"@crawlee/types": "^3.0.4",
"@crawlee/utils": "^3.0.4",
"cheerio": "1.0.0-rc.12",
+ "devtools-protocol": "*",
"jquery": "^3.6.0",
"ow": "^0.28.1"
},