@crawlee/puppeteer 4.0.0-beta.103 → 4.0.0-beta.104
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.
|
@@ -9,11 +9,9 @@ import type { PuppeteerLaunchContext } from './puppeteer-launcher.js';
|
|
|
9
9
|
import type { InterceptHandler } from './utils/puppeteer_request_interception.js';
|
|
10
10
|
import type { BlockRequestsOptions, DirectNavigationOptions, InfiniteScrollOptions, InjectFileOptions, PuppeteerContextUtils, SaveSnapshotOptions } from './utils/puppeteer_utils.js';
|
|
11
11
|
export type PuppeteerGoToOptions = NonNullable<Parameters<Page['goto']>[1]>;
|
|
12
|
-
export interface PuppeteerCrawlingContext<UserData extends Dictionary =
|
|
13
|
-
}
|
|
14
|
-
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
15
|
-
export interface PuppeteerHook extends BrowserHook<PuppeteerCrawlingContext> {
|
|
12
|
+
export interface PuppeteerCrawlingContext<UserData extends Dictionary = any> extends BrowserCrawlingContext<Page, HTTPResponse, UserData, PuppeteerGoToOptions>, PuppeteerContextUtils {
|
|
16
13
|
}
|
|
14
|
+
export type PuppeteerHook<UserData extends Dictionary = any> = BrowserHook<PuppeteerCrawlingContext<UserData>>;
|
|
17
15
|
export interface PuppeteerCrawlerOptions<ContextExtension = Dictionary<never>, ExtendedContext extends PuppeteerCrawlingContext = PuppeteerCrawlingContext & ContextExtension, Routes extends Record<keyof Routes, Dictionary> = Record<string, GetUserDataFromRequest<PuppeteerCrawlingContext['request']>>> extends BrowserCrawlerOptions<Page, HTTPResponse, PuppeteerCrawlingContext, ContextExtension, ExtendedContext, {
|
|
18
16
|
browserPlugins: [PuppeteerPlugin];
|
|
19
17
|
}, Routes> {
|
|
@@ -37,7 +35,7 @@ export interface PuppeteerCrawlerOptions<ContextExtension = Dictionary<never>, E
|
|
|
37
35
|
* ]
|
|
38
36
|
* ```
|
|
39
37
|
*/
|
|
40
|
-
preNavigationHooks?: BrowserHook<PuppeteerCrawlingContext
|
|
38
|
+
preNavigationHooks?: BrowserHook<PuppeteerCrawlingContext<GetUserDataFromRequest<ExtendedContext['request']>>, ContextExtension>[];
|
|
41
39
|
/**
|
|
42
40
|
* Async functions that are sequentially evaluated after the navigation. Good for checking if the navigation was successful.
|
|
43
41
|
* The function accepts `crawlingContext` as the only parameter. A hook may optionally return a partial object
|
|
@@ -54,7 +52,7 @@ export interface PuppeteerCrawlerOptions<ContextExtension = Dictionary<never>, E
|
|
|
54
52
|
* ]
|
|
55
53
|
* ```
|
|
56
54
|
*/
|
|
57
|
-
postNavigationHooks?: BrowserHook<PuppeteerCrawlingContext
|
|
55
|
+
postNavigationHooks?: BrowserHook<PuppeteerCrawlingContext<GetUserDataFromRequest<ExtendedContext['request']>>, ContextExtension>[];
|
|
58
56
|
}
|
|
59
57
|
/**
|
|
60
58
|
* Provides a simple framework for parallel crawling of web pages
|
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.104",
|
|
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.104",
|
|
52
|
+
"@crawlee/browser-pool": "4.0.0-beta.104",
|
|
53
|
+
"@crawlee/core": "4.0.0-beta.104",
|
|
54
|
+
"@crawlee/types": "4.0.0-beta.104",
|
|
55
|
+
"@crawlee/utils": "4.0.0-beta.104",
|
|
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": "1c761e689e56ac06b67fc4f1dc091f693e024d12"
|
|
83
83
|
}
|