@crawlee/puppeteer 3.17.1-beta.45 → 3.17.1-beta.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -373,7 +373,7 @@ async function gotoExtended(page, request, gotoOptions = {}) {
|
|
|
373
373
|
}
|
|
374
374
|
const { url, method, headers, payload } = request;
|
|
375
375
|
const isEmpty = (o) => !o || Object.keys(o).length === 0;
|
|
376
|
-
if (method !== 'GET' || payload
|
|
376
|
+
if (method !== 'GET' || payload) {
|
|
377
377
|
// This is not deprecated, we use it to log only once.
|
|
378
378
|
log.deprecated('Using other request methods than GET, rewriting headers and adding payloads has a high impact on performance ' +
|
|
379
379
|
'in recent versions of Puppeteer. Use only when necessary.');
|
|
@@ -398,6 +398,9 @@ async function gotoExtended(page, request, gotoOptions = {}) {
|
|
|
398
398
|
};
|
|
399
399
|
await (0, puppeteer_request_interception_1.addInterceptRequestHandler)(page, interceptRequestHandler);
|
|
400
400
|
}
|
|
401
|
+
else if (!isEmpty(headers)) {
|
|
402
|
+
await page.setExtraHTTPHeaders(headers);
|
|
403
|
+
}
|
|
401
404
|
return page.goto(url, gotoOptions);
|
|
402
405
|
}
|
|
403
406
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/puppeteer",
|
|
3
|
-
"version": "3.17.1-beta.
|
|
3
|
+
"version": "3.17.1-beta.47",
|
|
4
4
|
"description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16.0.0"
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@apify/datastructures": "^2.0.0",
|
|
57
57
|
"@apify/log": "^2.4.0",
|
|
58
|
-
"@crawlee/browser": "3.17.1-beta.
|
|
59
|
-
"@crawlee/browser-pool": "3.17.1-beta.
|
|
60
|
-
"@crawlee/types": "3.17.1-beta.
|
|
61
|
-
"@crawlee/utils": "3.17.1-beta.
|
|
58
|
+
"@crawlee/browser": "3.17.1-beta.47",
|
|
59
|
+
"@crawlee/browser-pool": "3.17.1-beta.47",
|
|
60
|
+
"@crawlee/types": "3.17.1-beta.47",
|
|
61
|
+
"@crawlee/utils": "3.17.1-beta.47",
|
|
62
62
|
"cheerio": "1.0.0-rc.12",
|
|
63
63
|
"devtools-protocol": "*",
|
|
64
64
|
"idcac-playwright": "^0.2.0",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "93d7b6fccbd6e4f4b474adbba55e5f05051bbaf2"
|
|
89
89
|
}
|