@crawlee/playwright 4.0.0-beta.250 → 4.0.0-beta.252
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.
|
@@ -243,9 +243,14 @@ export class AdaptivePlaywrightCrawler extends BasicCrawler {
|
|
|
243
243
|
async #adaptPlaywrightContext(playwrightContext) {
|
|
244
244
|
// Capture the original response to avoid infinite recursion when the getter is copied to the context
|
|
245
245
|
const originalResponse = playwrightContext.response;
|
|
246
|
+
// `headers()` can return repeated headers (e.g. `set-cookie`) joined with `\n`, which `Headers` rejects
|
|
247
|
+
const headers = new Headers();
|
|
248
|
+
for (const { name, value } of await originalResponse.headersArray()) {
|
|
249
|
+
headers.append(name, value);
|
|
250
|
+
}
|
|
246
251
|
return {
|
|
247
252
|
response: new ResponseWithUrl(Uint8Array.from(await originalResponse.body()), {
|
|
248
|
-
headers
|
|
253
|
+
headers,
|
|
249
254
|
status: originalResponse.status(),
|
|
250
255
|
statusText: originalResponse.statusText(),
|
|
251
256
|
url: originalResponse.url(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/playwright",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.252",
|
|
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": ">=22.13.0"
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@apify/datastructures": "^3.0.1",
|
|
51
51
|
"@apify/timeout": "^1.0.1",
|
|
52
|
-
"@crawlee/basic": "4.0.0-beta.
|
|
53
|
-
"@crawlee/browser": "4.0.0-beta.
|
|
54
|
-
"@crawlee/browser-pool": "4.0.0-beta.
|
|
55
|
-
"@crawlee/cheerio": "4.0.0-beta.
|
|
56
|
-
"@crawlee/core": "4.0.0-beta.
|
|
57
|
-
"@crawlee/http-client": "4.0.0-beta.
|
|
58
|
-
"@crawlee/types": "4.0.0-beta.
|
|
59
|
-
"@crawlee/utils": "4.0.0-beta.
|
|
52
|
+
"@crawlee/basic": "4.0.0-beta.252",
|
|
53
|
+
"@crawlee/browser": "4.0.0-beta.252",
|
|
54
|
+
"@crawlee/browser-pool": "4.0.0-beta.252",
|
|
55
|
+
"@crawlee/cheerio": "4.0.0-beta.252",
|
|
56
|
+
"@crawlee/core": "4.0.0-beta.252",
|
|
57
|
+
"@crawlee/http-client": "4.0.0-beta.252",
|
|
58
|
+
"@crawlee/types": "4.0.0-beta.252",
|
|
59
|
+
"@crawlee/utils": "4.0.0-beta.252",
|
|
60
60
|
"cheerio": "^1.2.0",
|
|
61
61
|
"domhandler": "^6.0.1",
|
|
62
62
|
"jquery": "^3.7.1",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "50081244ad848b4f3df48c19953166629909af49"
|
|
85
85
|
}
|