@crawlee/playwright 4.0.0-beta.200 → 4.0.0-beta.201
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.
|
@@ -484,7 +484,11 @@ export async function handleCloudflareChallenge(page, url, options = {}) {
|
|
|
484
484
|
};
|
|
485
485
|
// check if we ended up on the CF challenge page
|
|
486
486
|
const isChallenge = async () => {
|
|
487
|
-
return options.isChallengeCallback(page).catch(() =>
|
|
487
|
+
return options.isChallengeCallback(page).catch(async () => {
|
|
488
|
+
// the challenge page navigates itself, which destroys the context of an in-flight check
|
|
489
|
+
await page.waitForLoadState('domcontentloaded').catch(() => { });
|
|
490
|
+
return options.isChallengeCallback(page).catch(() => false);
|
|
491
|
+
});
|
|
488
492
|
};
|
|
489
493
|
if (!(await isChallenge())) {
|
|
490
494
|
await retryBlocked();
|
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.201",
|
|
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.0.0"
|
|
@@ -49,13 +49,13 @@
|
|
|
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/types": "4.0.0-beta.
|
|
58
|
-
"@crawlee/utils": "4.0.0-beta.
|
|
52
|
+
"@crawlee/basic": "4.0.0-beta.201",
|
|
53
|
+
"@crawlee/browser": "4.0.0-beta.201",
|
|
54
|
+
"@crawlee/browser-pool": "4.0.0-beta.201",
|
|
55
|
+
"@crawlee/cheerio": "4.0.0-beta.201",
|
|
56
|
+
"@crawlee/core": "4.0.0-beta.201",
|
|
57
|
+
"@crawlee/types": "4.0.0-beta.201",
|
|
58
|
+
"@crawlee/utils": "4.0.0-beta.201",
|
|
59
59
|
"cheerio": "^1.0.0",
|
|
60
60
|
"jquery": "^3.7.1",
|
|
61
61
|
"ml-logistic-regression": "^2.0.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "5b29925251e92eb69252045f4980153844f58462"
|
|
84
84
|
}
|