@crawlee/puppeteer 4.0.0-beta.100 → 4.0.0-beta.102
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.
|
@@ -22,7 +22,6 @@ import { createRequire } from 'node:module';
|
|
|
22
22
|
import vm from 'node:vm';
|
|
23
23
|
import { Configuration, KeyValueStore, serviceLocator, validators } from '@crawlee/browser';
|
|
24
24
|
import { expandShadowRoots, sleep } from '@crawlee/utils';
|
|
25
|
-
import * as cheerio from 'cheerio';
|
|
26
25
|
import ow from 'ow';
|
|
27
26
|
import { LruCache } from '@apify/datastructures';
|
|
28
27
|
import { enqueueLinksByClickingElements } from '../enqueue-links/click-elements.js';
|
|
@@ -142,7 +141,8 @@ export async function parseWithCheerio(page, ignoreShadowRoots = false, ignoreIf
|
|
|
142
141
|
? null
|
|
143
142
|
: (await page.evaluate(`(${expandShadowRoots.toString()})(document)`));
|
|
144
143
|
const pageContent = html || (await page.content());
|
|
145
|
-
|
|
144
|
+
const { load } = await import('cheerio');
|
|
145
|
+
return load(pageContent);
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
148
|
* Forces the Puppeteer browser tab to block loading URLs that match a provided pattern.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/puppeteer",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.102",
|
|
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"
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@apify/datastructures": "^2.0.3",
|
|
51
|
-
"@crawlee/browser": "4.0.0-beta.
|
|
52
|
-
"@crawlee/browser-pool": "4.0.0-beta.
|
|
53
|
-
"@crawlee/core": "4.0.0-beta.
|
|
54
|
-
"@crawlee/types": "4.0.0-beta.
|
|
55
|
-
"@crawlee/utils": "4.0.0-beta.
|
|
51
|
+
"@crawlee/browser": "4.0.0-beta.102",
|
|
52
|
+
"@crawlee/browser-pool": "4.0.0-beta.102",
|
|
53
|
+
"@crawlee/core": "4.0.0-beta.102",
|
|
54
|
+
"@crawlee/types": "4.0.0-beta.102",
|
|
55
|
+
"@crawlee/utils": "4.0.0-beta.102",
|
|
56
56
|
"cheerio": "^1.0.0",
|
|
57
57
|
"devtools-protocol": "*",
|
|
58
58
|
"idcac-playwright": "^0.2.0",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "19eec2f388401dc75cf82d8cdcad5dd27143b1aa"
|
|
83
83
|
}
|