@crawlee/playwright 4.0.0-beta.242 → 4.0.0-beta.244
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.
|
@@ -382,14 +382,21 @@ export class AdaptivePlaywrightCrawler extends BasicCrawler {
|
|
|
382
382
|
crawlingContext.log.debug(`Running browser request handler for ${crawlingContext.request.url}`);
|
|
383
383
|
this.statistics.state.browserRequestHandlerRuns++;
|
|
384
384
|
const browserRun = await this.#crawlOne('clientOnly', crawlingContext, crawlingContext.useState, transactions);
|
|
385
|
-
// A failed browser attempt is handed to the retry logic with its writes - `userData` stashed for the
|
|
386
|
-
// next attempt must survive.
|
|
387
|
-
this.#keepContextModifications(browserRun.contextModifications);
|
|
388
385
|
if (!browserRun.ok) {
|
|
386
|
+
// A failed browser attempt is handed to the retry logic with its writes - `userData` stashed for the
|
|
387
|
+
// next attempt must survive.
|
|
388
|
+
this.#keepContextModifications(browserRun.contextModifications);
|
|
389
389
|
throw browserRun.error;
|
|
390
390
|
}
|
|
391
|
-
|
|
392
|
-
|
|
391
|
+
try {
|
|
392
|
+
browserRun.logs.forEach(([log, method, ...args]) => log[method](...args));
|
|
393
|
+
// The `afterStorageCommit` callbacks belong to this attempt, so the detection rerun undoes their
|
|
394
|
+
// writes too - the journals stay open until they have run.
|
|
395
|
+
await browserRun.transaction.commit();
|
|
396
|
+
}
|
|
397
|
+
finally {
|
|
398
|
+
this.#keepContextModifications(browserRun.contextModifications);
|
|
399
|
+
}
|
|
393
400
|
// Past the shutdown fence, `teardown()` has already drained - and possibly torn down the predictor.
|
|
394
401
|
if (httpResultRejected && !this.#shutDown) {
|
|
395
402
|
this.#storeRenderingType(crawlingContext.request, 'clientOnly');
|
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.244",
|
|
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.244",
|
|
53
|
+
"@crawlee/browser": "4.0.0-beta.244",
|
|
54
|
+
"@crawlee/browser-pool": "4.0.0-beta.244",
|
|
55
|
+
"@crawlee/cheerio": "4.0.0-beta.244",
|
|
56
|
+
"@crawlee/core": "4.0.0-beta.244",
|
|
57
|
+
"@crawlee/http-client": "4.0.0-beta.244",
|
|
58
|
+
"@crawlee/types": "4.0.0-beta.244",
|
|
59
|
+
"@crawlee/utils": "4.0.0-beta.244",
|
|
60
60
|
"cheerio": "^1.0.0",
|
|
61
61
|
"domhandler": "^6.0.0",
|
|
62
62
|
"jquery": "^3.7.1",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "e26d10df9c1d550b7237ac27b25999432544d6a1"
|
|
85
85
|
}
|