@crawlee/playwright 4.0.0-beta.7 → 4.0.0-beta.70

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.
package/README.md CHANGED
@@ -1,19 +1,23 @@
1
1
  <h1 align="center">
2
2
  <a href="https://crawlee.dev">
3
3
  <picture>
4
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/apify/crawlee/master/website/static/img/crawlee-dark.svg?sanitize=true">
5
- <img alt="Crawlee" src="https://raw.githubusercontent.com/apify/crawlee/master/website/static/img/crawlee-light.svg?sanitize=true" width="500">
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/apify/crawlee/master/website/static/img/crawlee-dark.svg?sanitize=true" />
5
+ <img alt="Crawlee" src="https://raw.githubusercontent.com/apify/crawlee/master/website/static/img/crawlee-light.svg?sanitize=true" width="500" />
6
6
  </picture>
7
7
  </a>
8
- <br>
8
+ <br />
9
9
  <small>A web scraping and browser automation library</small>
10
10
  </h1>
11
11
 
12
- <p align=center>
13
- <a href="https://www.npmjs.com/package/@crawlee/core" rel="nofollow"><img src="https://img.shields.io/npm/v/@crawlee/core.svg" alt="NPM latest version" data-canonical-src="https://img.shields.io/npm/v/@crawlee/core/next.svg" style="max-width: 100%;"></a>
14
- <a href="https://www.npmjs.com/package/@crawlee/core" rel="nofollow"><img src="https://img.shields.io/npm/dm/@crawlee/core.svg" alt="Downloads" data-canonical-src="https://img.shields.io/npm/dm/@crawlee/core.svg" style="max-width: 100%;"></a>
15
- <a href="https://discord.gg/jyEM2PRvMU" rel="nofollow"><img src="https://img.shields.io/discord/801163717915574323?label=discord" alt="Chat on discord" data-canonical-src="https://img.shields.io/discord/801163717915574323?label=discord" style="max-width: 100%;"></a>
16
- <a href="https://github.com/apify/crawlee/actions/workflows/test-ci.yml"><img src="https://github.com/apify/crawlee/actions/workflows/test-ci.yml/badge.svg?branch=master" alt="Build Status" style="max-width: 100%;"></a>
12
+ <p align="center">
13
+ <a href="https://trendshift.io/repositories/5179" target="_blank"><img src="https://trendshift.io/api/badge/repositories/5179" alt="apify%2Fcrawlee | Trendshift" width="250" height="55"/></a>
14
+ </p>
15
+
16
+ <p align="center">
17
+ <a href="https://www.npmjs.com/package/@crawlee/core" rel="nofollow"><img src="https://img.shields.io/npm/v/@crawlee/core.svg" alt="NPM latest version" data-canonical-src="https://img.shields.io/npm/v/@crawlee/core/next.svg" /></a>
18
+ <a href="https://www.npmjs.com/package/@crawlee/core" rel="nofollow"><img src="https://img.shields.io/npm/dm/@crawlee/core.svg" alt="Downloads" data-canonical-src="https://img.shields.io/npm/dm/@crawlee/core.svg" /></a>
19
+ <a href="https://discord.gg/jyEM2PRvMU" rel="nofollow"><img src="https://img.shields.io/discord/801163717915574323?label=discord" alt="Chat on discord" data-canonical-src="https://img.shields.io/discord/801163717915574323?label=discord" /></a>
20
+ <a href="https://github.com/apify/crawlee/actions/workflows/test-ci.yml"><img src="https://github.com/apify/crawlee/actions/workflows/test-ci.yml/badge.svg?branch=master" alt="Build Status" /></a>
17
21
  </p>
18
22
 
19
23
  Crawlee covers your crawling and scraping end-to-end and **helps you build reliable scrapers. Fast.**
@@ -24,7 +28,7 @@ Crawlee is available as the [`crawlee`](https://www.npmjs.com/package/crawlee) N
24
28
 
25
29
  > 👉 **View full documentation, guides and examples on the [Crawlee project website](https://crawlee.dev)** 👈
26
30
 
27
- > Crawlee for Python is open for early adopters. 🐍 [👉 Checkout the source code 👈](https://github.com/apify/crawlee-python).
31
+ > Do you prefer 🐍 Python instead of JavaScript? [👉 Checkout Crawlee for Python 👈](https://github.com/apify/crawlee-python).
28
32
 
29
33
  ## Installation
30
34
 
@@ -85,7 +89,7 @@ By default, Crawlee stores data to `./storage` in the current working directory.
85
89
  We provide automated beta builds for every merged code change in Crawlee. You can find them in the npm [list of releases](https://www.npmjs.com/package/crawlee?activeTab=versions). If you want to test new features or bug fixes before we release them, feel free to install a beta build like this:
86
90
 
87
91
  ```bash
88
- npm install crawlee@3.12.3-beta.13
92
+ npm install crawlee@next
89
93
  ```
90
94
 
91
95
  If you also use the [Apify SDK](https://github.com/apify/apify-sdk-js), you need to specify dependency overrides in your `package.json` file so that you don't end up with multiple versions of Crawlee installed:
@@ -94,9 +98,9 @@ If you also use the [Apify SDK](https://github.com/apify/apify-sdk-js), you need
94
98
  {
95
99
  "overrides": {
96
100
  "apify": {
97
- "@crawlee/core": "3.12.3-beta.13",
98
- "@crawlee/types": "3.12.3-beta.13",
99
- "@crawlee/utils": "3.12.3-beta.13"
101
+ "@crawlee/core": "$crawlee",
102
+ "@crawlee/types": "$crawlee",
103
+ "@crawlee/utils": "$crawlee"
100
104
  }
101
105
  }
102
106
  }
@@ -1,24 +1,16 @@
1
- import type { BrowserHook, LoadedContext, RouterHandler } from '@crawlee/browser';
2
- import type { BaseHttpResponseData, GetUserDataFromRequest, RestrictedCrawlingContext, RouterRoutes, StatisticsOptions, StatisticState } from '@crawlee/core';
3
- import { Configuration, RequestHandlerResult, Statistics } from '@crawlee/core';
4
- import type { Awaitable, Dictionary } from '@crawlee/types';
1
+ import { BasicCrawler } from '@crawlee/basic';
2
+ import type { BasicCrawlerOptions, BrowserHook, LoadedRequest, Request } from '@crawlee/browser';
3
+ import type { ContextPipeline, CrawlingContext, EnqueueLinksOptions, GetUserDataFromRequest, RestrictedCrawlingContext, RouterRoutes, StatisticsOptions, StatisticState } from '@crawlee/core';
4
+ import { RequestHandlerResult, Statistics } from '@crawlee/core';
5
+ import type { BatchAddRequestsResult, Dictionary } from '@crawlee/types';
5
6
  import { type CheerioRoot } from '@crawlee/utils';
6
7
  import { type Cheerio } from 'cheerio';
8
+ import type { AnyNode } from 'domhandler';
7
9
  // @ts-ignore optional peer dependency or compatibility with es2022
8
10
  import type { Page } from 'playwright';
9
- import type { Log } from '@apify/log';
10
- import type { PlaywrightCrawlerOptions, PlaywrightCrawlingContext, PlaywrightGotoOptions } from './playwright-crawler.js';
11
- import { PlaywrightCrawler } from './playwright-crawler.js';
11
+ import type { SetRequired } from 'type-fest';
12
+ import type { PlaywrightGotoOptions } from './playwright-crawler.js';
12
13
  import { RenderingTypePredictor } from './utils/rendering-type-prediction.js';
13
- type Result<TResult> = {
14
- result: TResult;
15
- ok: true;
16
- logs?: LogProxyCall[];
17
- } | {
18
- error: unknown;
19
- ok: false;
20
- logs?: LogProxyCall[];
21
- };
22
14
  interface AdaptivePlaywrightCrawlerStatisticState extends StatisticState {
23
15
  httpOnlyRequestHandlerRuns?: number;
24
16
  browserRequestHandlerRuns?: number;
@@ -33,11 +25,12 @@ declare class AdaptivePlaywrightCrawlerStatistics extends Statistics {
33
25
  trackBrowserRequestHandlerRun(): void;
34
26
  trackRenderingTypeMisprediction(): void;
35
27
  }
36
- export interface AdaptivePlaywrightCrawlerContext<UserData extends Dictionary = Dictionary> extends RestrictedCrawlingContext<UserData> {
28
+ export interface AdaptivePlaywrightCrawlerContext<UserData extends Dictionary = Dictionary> extends CrawlingContext<UserData> {
29
+ request: LoadedRequest<Request<UserData>>;
37
30
  /**
38
31
  * The HTTP response, either from the HTTP client or from the initial request from playwright's navigation.
39
32
  */
40
- response: BaseHttpResponseData;
33
+ response: Response;
41
34
  /**
42
35
  * Playwright Page object. If accessed in HTTP-only rendering, this will throw an error and make the AdaptivePlaywrightCrawlerContext retry the request in a browser.
43
36
  */
@@ -46,7 +39,7 @@ export interface AdaptivePlaywrightCrawlerContext<UserData extends Dictionary =
46
39
  * Wait for an element matching the selector to appear and return a Cheerio object of matched elements.
47
40
  * Timeout defaults to 5s.
48
41
  */
49
- querySelector<T = any>(selector: string, timeoutMs?: number): Promise<Cheerio<T>>;
42
+ querySelector(selector: string, timeoutMs?: number): Promise<Cheerio<AnyNode>>;
50
43
  /**
51
44
  * Wait for an element matching the selector to appear.
52
45
  * Timeout defaults to 5s.
@@ -74,36 +67,38 @@ export interface AdaptivePlaywrightCrawlerContext<UserData extends Dictionary =
74
67
  * ```
75
68
  */
76
69
  parseWithCheerio(selector?: string, timeoutMs?: number): Promise<CheerioRoot>;
70
+ enqueueLinks(options?: EnqueueLinksOptions): Promise<unknown>;
77
71
  }
78
- interface AdaptiveHook extends BrowserHook<Pick<AdaptivePlaywrightCrawlerContext, 'id' | 'request' | 'session' | 'proxyInfo' | 'log'> & {
72
+ interface AdaptiveHookContext extends Pick<AdaptivePlaywrightCrawlerContext, 'id' | 'session' | 'proxyInfo' | 'log'> {
79
73
  page?: Page;
80
- }, PlaywrightGotoOptions> {
74
+ request: Request;
75
+ gotoOptions?: PlaywrightGotoOptions;
81
76
  }
82
- export interface AdaptivePlaywrightCrawlerOptions extends Omit<PlaywrightCrawlerOptions, 'requestHandler' | 'preNavigationHooks' | 'postNavigationHooks'> {
83
- /**
84
- * Function that is called to process each request.
85
- *
86
- * The function receives the {@link AdaptivePlaywrightCrawlingContext} as an argument, and it must refrain from calling code with side effects,
87
- * other than the methods of the crawling context. Any other side effects may be invoked repeatedly by the crawler, which can lead to inconsistent results.
88
- *
89
- * The function must return a promise, which is then awaited by the crawler.
90
- *
91
- * If the function throws an exception, the crawler will try to re-crawl the
92
- * request later, up to `option.maxRequestRetries` times.
93
- */
94
- requestHandler?: (crawlingContext: LoadedContext<AdaptivePlaywrightCrawlerContext>) => Awaitable<void>;
77
+ interface AdaptiveHook extends BrowserHook<AdaptiveHookContext> {
78
+ }
79
+ interface AdaptivePostNavigationHook extends BrowserHook<Omit<AdaptiveHookContext, 'request'> & {
80
+ request: LoadedRequest<Request>;
81
+ }> {
82
+ }
83
+ export interface AdaptivePlaywrightCrawlerOptions<ExtendedContext extends AdaptivePlaywrightCrawlerContext = AdaptivePlaywrightCrawlerContext> extends Omit<BasicCrawlerOptions<AdaptivePlaywrightCrawlerContext, ExtendedContext>, 'preNavigationHooks' | 'postNavigationHooks'> {
95
84
  /**
96
85
  * Async functions that are sequentially evaluated before the navigation. Good for setting additional cookies.
97
86
  * The function accepts a subset of the crawling context. If you attempt to access the `page` property during HTTP-only crawling,
98
87
  * an exception will be thrown. If it's not caught, the request will be transparently retried in a browser.
88
+ *
89
+ * A hook may optionally return a partial object whose properties are merged into the crawling context,
90
+ * allowing the hook to override context members for subsequent hooks and pipeline stages.
99
91
  */
100
92
  preNavigationHooks?: AdaptiveHook[];
101
93
  /**
102
94
  * Async functions that are sequentially evaluated after the navigation. Good for checking if the navigation was successful.
103
95
  * The function accepts a subset of the crawling context. If you attempt to access the `page` property during HTTP-only crawling,
104
96
  * an exception will be thrown. If it's not caught, the request will be transparently retried in a browser.
97
+ *
98
+ * A hook may optionally return a partial object whose properties are merged into the crawling context
99
+ * (e.g. to override `response` after solving a challenge).
105
100
  */
106
- postNavigationHooks?: AdaptiveHook[];
101
+ postNavigationHooks?: AdaptivePostNavigationHook[];
107
102
  /**
108
103
  * Specifies the frequency of rendering type detection checks - 0.1 means roughly 10% of requests.
109
104
  * Defaults to 0.1 (so 10%).
@@ -117,23 +112,24 @@ export interface AdaptivePlaywrightCrawlerOptions extends Omit<PlaywrightCrawler
117
112
  resultChecker?: (result: RequestHandlerResult) => boolean;
118
113
  /**
119
114
  * An optional callback used in rendering type detection. On each detection, the result of the plain HTTP run is compared to that of the browser one.
120
- * If the callback returns true, the results are considered equal and the target site is considered static.
115
+ * If a callback is provided, the contract is as follows:
116
+ * It the callback returns true or 'equal', the results are considered equal and the target site is considered static.
117
+ * If it returns false or 'different', the target site is considered client-rendered.
118
+ * If it returns 'inconclusive', the detection result won't be used.
121
119
  * If no result comparator is specified, but there is a `resultChecker`, any site where the `resultChecker` returns true is considered static.
122
120
  * If neither `resultComparator` nor `resultChecker` are specified, a deep comparison of returned dataset items is used as a default.
123
121
  */
124
- resultComparator?: (resultA: RequestHandlerResult, resultB: RequestHandlerResult) => boolean;
122
+ resultComparator?: (resultA: RequestHandlerResult, resultB: RequestHandlerResult) => boolean | 'equal' | 'different' | 'inconclusive';
125
123
  /**
126
124
  * A custom rendering type predictor
127
125
  */
128
- renderingTypePredictor?: Pick<RenderingTypePredictor, 'predict' | 'storeResult'>;
126
+ renderingTypePredictor?: Pick<RenderingTypePredictor, 'predict' | 'storeResult' | 'initialize'>;
129
127
  /**
130
128
  * Prevent direct access to storage in request handlers (only allow using context helpers).
131
129
  * Defaults to `true`
132
130
  */
133
131
  preventDirectStorageAccess?: boolean;
134
132
  }
135
- declare const proxyLogMethods: readonly ["error", "exception", "softFail", "info", "debug", "perf", "warningOnce", "deprecated"];
136
- type LogProxyCall = [log: Log, method: (typeof proxyLogMethods)[number], ...args: unknown[]];
137
133
  /**
138
134
  * An extension of {@link PlaywrightCrawler} that uses a more limited request handler interface so that it is able to switch to HTTP-only crawling when it detects it may be possible.
139
135
  *
@@ -163,31 +159,45 @@ type LogProxyCall = [log: Log, method: (typeof proxyLogMethods)[number], ...args
163
159
  *
164
160
  * @experimental
165
161
  */
166
- export declare class AdaptivePlaywrightCrawler extends PlaywrightCrawler {
167
- readonly config: Configuration;
168
- private adaptiveRequestHandler;
162
+ export declare class AdaptivePlaywrightCrawler<ExtendedContext extends AdaptivePlaywrightCrawlerContext = AdaptivePlaywrightCrawlerContext> extends BasicCrawler<AdaptivePlaywrightCrawlerContext, ExtendedContext> {
169
163
  private renderingTypePredictor;
170
164
  private resultChecker;
171
165
  private resultComparator;
172
166
  private preventDirectStorageAccess;
167
+ private staticContextPipeline;
168
+ private browserContextPipeline;
169
+ private individualRequestHandlerTimeoutMillis;
173
170
  readonly stats: AdaptivePlaywrightCrawlerStatistics;
171
+ private resultObjects;
172
+ private inFlightRenderingTypeDetections;
173
+ private teardownHooks;
174
+ constructor(options?: AdaptivePlaywrightCrawlerOptions<ExtendedContext>);
175
+ protected _init(): Promise<void>;
176
+ protected buildContextPipeline(): ContextPipeline<CrawlingContext<Dictionary>, CrawlingContext<Dictionary> & {
177
+ readonly request: LoadedRequest<Request<Dictionary>>;
178
+ readonly response: Response;
179
+ readonly page: Page;
180
+ readonly querySelector: AdaptivePlaywrightCrawlerContext["querySelector"];
181
+ readonly waitForSelector: AdaptivePlaywrightCrawlerContext["waitForSelector"];
182
+ readonly parseWithCheerio: AdaptivePlaywrightCrawlerContext["parseWithCheerio"];
183
+ }>;
184
+ private adaptCheerioContext;
185
+ private adaptPlaywrightContext;
186
+ private crawlOne;
187
+ protected runRequestHandler(crawlingContext: CrawlingContext): Promise<void>;
188
+ protected commitResult(crawlingContext: CrawlingContext, { calls, keyValueStoreChanges }: RequestHandlerResult): Promise<void>;
189
+ protected allowStorageAccess<R, TArgs extends any[]>(func: (...args: TArgs) => Promise<R>): (...args: TArgs) => Promise<R>;
174
190
  /**
175
- * Default {@link Router} instance that will be used if we don't specify any {@link AdaptivePlaywrightCrawlerOptions.requestHandler|`requestHandler`}.
176
- * See {@link Router.addHandler|`router.addHandler()`} and {@link Router.addDefaultHandler|`router.addDefaultHandler()`}.
191
+ * Reading the pending request count queries the underlying request manager, which counts as storage access.
192
+ * Since this is internal crawler bookkeeping used to compute the `enqueueLinks` limit (not user-initiated storage
193
+ * access), it must be allowed even while a request handler runs inside the storage-access guard.
177
194
  */
178
- // @ts-ignore optional peer dependency or compatibility with es2022
179
- readonly router: RouterHandler<AdaptivePlaywrightCrawlerContext>;
180
- constructor(options?: AdaptivePlaywrightCrawlerOptions, config?: Configuration);
181
- protected _runRequestHandler(crawlingContext: PlaywrightCrawlingContext): Promise<void>;
182
- protected commitResult(crawlingContext: PlaywrightCrawlingContext, { calls, keyValueStoreChanges }: RequestHandlerResult): Promise<void>;
183
- protected allowStorageAccess<R, TArgs extends any[]>(func: (...args: TArgs) => Promise<R>): (...args: TArgs) => Promise<R>;
184
- protected runRequestHandlerInBrowser(crawlingContext: PlaywrightCrawlingContext): Promise<{
185
- result: Result<RequestHandlerResult>;
186
- initialStateCopy?: Record<string, unknown>;
187
- }>;
188
- protected runRequestHandlerWithPlainHTTP(crawlingContext: PlaywrightCrawlingContext, oldStateCopy?: Dictionary): Promise<Result<RequestHandlerResult>>;
195
+ protected getPendingRequestCountApproximation(): Promise<number>;
196
+ protected enqueueLinks(options: SetRequired<EnqueueLinksOptions, 'urls'>, request: RestrictedCrawlingContext['request'], result: RequestHandlerResult): Promise<BatchAddRequestsResult>;
189
197
  private createLogProxy;
198
+ teardown(): Promise<void>;
190
199
  }
191
- export declare function createAdaptivePlaywrightRouter<Context extends AdaptivePlaywrightCrawlerContext = AdaptivePlaywrightCrawlerContext, UserData extends Dictionary = GetUserDataFromRequest<Context['request']>>(routes?: RouterRoutes<Context, UserData>): RouterHandler<Context>;
200
+ // @ts-ignore optional peer dependency or compatibility with es2022
201
+ export declare function createAdaptivePlaywrightRouter<Context extends AdaptivePlaywrightCrawlerContext = AdaptivePlaywrightCrawlerContext, UserData extends Dictionary = GetUserDataFromRequest<Context['request']>>(routes?: RouterRoutes<Context, UserData>): import("@crawlee/basic").RouterHandler<Context>;
192
202
  export {};
193
203
  //# sourceMappingURL=adaptive-playwright-crawler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"adaptive-playwright-crawler.d.ts","sourceRoot":"","sources":["../../src/internals/adaptive-playwright-crawler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAA0B,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE1G,OAAO,KAAK,EACR,oBAAoB,EACpB,sBAAsB,EACtB,yBAAyB,EACzB,YAAY,EAEZ,iBAAiB,EACjB,cAAc,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAU,UAAU,EAA4B,MAAM,eAAe,CAAC;AAClH,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,KAAK,WAAW,EAA0B,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,SAAS,CAAC;AAE7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,KAAK,E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