@crawlee/browser 4.0.0-beta.3 → 4.0.0-beta.30

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
@@ -9,6 +9,10 @@
9
9
  <small>A web scraping and browser automation library</small>
10
10
  </h1>
11
11
 
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" style="width: 250px; height: 55px;" width="250" height="55"/></a>
14
+ </p>
15
+
12
16
  <p align=center>
13
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" style="max-width: 100%;"></a>
14
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" style="max-width: 100%;"></a>
@@ -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
 
@@ -1,19 +1,38 @@
1
- import type { Awaitable, BasicCrawlerOptions, CrawlingContext, Dictionary, EnqueueLinksOptions, ErrorHandler, LoadedContext, ProxyConfiguration, RequestHandler, RequestProvider, SkippedRequestCallback } from '@crawlee/basic';
2
- import { BasicCrawler, Configuration } from '@crawlee/basic';
1
+ import type { Awaitable, BasicCrawlerOptions, BasicCrawlingContext, CrawlingContext, Dictionary, EnqueueLinksOptions, ErrorHandler, LoadedRequest, Request, RequestHandler, RequestProvider, SkippedRequestCallback } from '@crawlee/basic';
2
+ import { BasicCrawler, ContextPipeline } from '@crawlee/basic';
3
3
  import type { BrowserController, BrowserPlugin, BrowserPoolHooks, BrowserPoolOptions, CommonPage, InferBrowserPluginArray, LaunchContext } from '@crawlee/browser-pool';
4
4
  import { BrowserPool } from '@crawlee/browser-pool';
5
+ import type { BatchAddRequestsResult } from '@crawlee/types';
5
6
  import type { RobotsTxtFile } from '@crawlee/utils';
6
7
  import type { ReadonlyDeep } from 'type-fest';
7
8
  import type { BrowserLaunchContext } from './browser-launcher.js';
8
- export interface BrowserCrawlingContext<Crawler = unknown, Page extends CommonPage = CommonPage, Response = Dictionary, ProvidedController = BrowserController, UserData extends Dictionary = Dictionary> extends CrawlingContext<Crawler, UserData> {
9
+ interface BaseResponse {
10
+ status(): number;
11
+ }
12
+ export interface BrowserCrawlingContext<Page extends CommonPage = CommonPage, Response extends BaseResponse = BaseResponse, ProvidedController = BrowserController, UserData extends Dictionary = Dictionary> extends CrawlingContext<UserData> {
13
+ /**
14
+ * An instance of the {@link BrowserController} that manages the browser instance and provides access to its API.
15
+ */
9
16
  browserController: ProvidedController;
17
+ /**
18
+ * The browser page object where the web page is loaded and rendered.
19
+ */
10
20
  page: Page;
11
- response?: Response;
21
+ /**
22
+ * The request object that was successfully loaded and navigated to, including the {@link Request.loadedUrl|`loadedUrl`} property.
23
+ */
24
+ request: LoadedRequest<Request<UserData>>;
25
+ /**
26
+ * The HTTP response object returned by the browser's navigation.
27
+ */
28
+ response: Response;
29
+ /**
30
+ * Helper function for extracting URLs from the current page and adding them to the request queue.
31
+ */
32
+ enqueueLinks: (options?: EnqueueLinksOptions) => Promise<BatchAddRequestsResult>;
12
33
  }
13
- export type BrowserRequestHandler<Context extends BrowserCrawlingContext = BrowserCrawlingContext> = RequestHandler<Context>;
14
- export type BrowserErrorHandler<Context extends BrowserCrawlingContext = BrowserCrawlingContext> = ErrorHandler<Context>;
15
34
  export type BrowserHook<Context = BrowserCrawlingContext, GoToOptions extends Dictionary | undefined = Dictionary> = (crawlingContext: Context, gotoOptions: GoToOptions) => Awaitable<void>;
16
- export interface BrowserCrawlerOptions<Context extends BrowserCrawlingContext = BrowserCrawlingContext, InternalBrowserPoolOptions extends BrowserPoolOptions = BrowserPoolOptions, __BrowserPlugins extends BrowserPlugin[] = InferBrowserPluginArray<InternalBrowserPoolOptions['browserPlugins']>, __BrowserControllerReturn extends BrowserController = ReturnType<__BrowserPlugins[number]['createController']>, __LaunchContextReturn extends LaunchContext = ReturnType<__BrowserPlugins[number]['createLaunchContext']>> extends Omit<BasicCrawlerOptions, 'requestHandler' | 'failedRequestHandler' | 'errorHandler'> {
35
+ export interface BrowserCrawlerOptions<Page extends CommonPage = CommonPage, Response extends BaseResponse = BaseResponse, ProvidedController extends BrowserController = BrowserController, Context extends BrowserCrawlingContext<Page, Response, ProvidedController, Dictionary> = BrowserCrawlingContext<Page, Response, ProvidedController, Dictionary>, ContextExtension = Dictionary<never>, ExtendedContext extends Context = Context & ContextExtension, InternalBrowserPoolOptions extends BrowserPoolOptions = BrowserPoolOptions, __BrowserPlugins extends BrowserPlugin[] = InferBrowserPluginArray<InternalBrowserPoolOptions['browserPlugins']>, __BrowserControllerReturn extends BrowserController = ReturnType<__BrowserPlugins[number]['createController']>, __LaunchContextReturn extends LaunchContext = ReturnType<__BrowserPlugins[number]['createLaunchContext']>> extends Omit<BasicCrawlerOptions<Context, ExtendedContext>, 'requestHandler' | 'failedRequestHandler' | 'errorHandler'> {
17
36
  launchContext?: BrowserLaunchContext<any, any>;
18
37
  /**
19
38
  * Function that is called to process each request.
@@ -42,7 +61,7 @@ export interface BrowserCrawlerOptions<Context extends BrowserCrawlingContext =
42
61
  * The exceptions are logged to the request using the
43
62
  * {@link Request.pushErrorMessage|`Request.pushErrorMessage()`} function.
44
63
  */
45
- requestHandler?: BrowserRequestHandler<LoadedContext<Context>>;
64
+ requestHandler?: RequestHandler<ExtendedContext>;
46
65
  /**
47
66
  * User-provided function that allows modifying the request object before it gets retried by the crawler.
48
67
  * It's executed before each retry for the requests that failed less than {@link BrowserCrawlerOptions.maxRequestRetries|`maxRequestRetries`} times.
@@ -53,7 +72,7 @@ export interface BrowserCrawlerOptions<Context extends BrowserCrawlingContext =
53
72
  * Second argument is the `Error` instance that
54
73
  * represents the last error thrown during processing of the request.
55
74
  */
56
- errorHandler?: BrowserErrorHandler<Context>;
75
+ errorHandler?: ErrorHandler<CrawlingContext, ExtendedContext>;
57
76
  /**
58
77
  * A function to handle requests that failed more than `option.maxRequestRetries` times.
59
78
  *
@@ -63,17 +82,12 @@ export interface BrowserCrawlerOptions<Context extends BrowserCrawlingContext =
63
82
  * Second argument is the `Error` instance that
64
83
  * represents the last error thrown during processing of the request.
65
84
  */
66
- failedRequestHandler?: BrowserErrorHandler<Context>;
85
+ failedRequestHandler?: ErrorHandler<CrawlingContext, ExtendedContext>;
67
86
  /**
68
87
  * Custom options passed to the underlying {@link BrowserPool} constructor.
69
88
  * We can tweak those to fine-tune browser management.
70
89
  */
71
90
  browserPoolOptions?: Partial<BrowserPoolOptions> & Partial<BrowserPoolHooks<__BrowserControllerReturn, __LaunchContextReturn>>;
72
- /**
73
- * If set, the crawler will be configured for all connections to use
74
- * the Proxy URLs provided and rotated according to the configuration.
75
- */
76
- proxyConfiguration?: ProxyConfiguration;
77
91
  /**
78
92
  * Async functions that are sequentially evaluated before the navigation. Good for setting additional cookies
79
93
  * or browser properties before navigation. The function accepts two parameters, `crawlingContext` and `gotoOptions`,
@@ -178,21 +192,15 @@ export interface BrowserCrawlerOptions<Context extends BrowserCrawlingContext =
178
192
  *
179
193
  * @category Crawlers
180
194
  */
181
- export declare abstract class BrowserCrawler<InternalBrowserPoolOptions extends BrowserPoolOptions = BrowserPoolOptions, LaunchOptions extends Dictionary | undefined = Dictionary, Context extends BrowserCrawlingContext = BrowserCrawlingContext, GoToOptions extends Dictionary = Dictionary> extends BasicCrawler<Context> {
182
- readonly config: Configuration;
183
- /**
184
- * A reference to the underlying {@link ProxyConfiguration} class that manages the crawler's proxies.
185
- * Only available if used by the crawler.
186
- */
187
- proxyConfiguration?: ProxyConfiguration;
195
+ export declare abstract class BrowserCrawler<Page extends CommonPage = CommonPage, Response extends BaseResponse = BaseResponse, ProvidedController extends BrowserController = BrowserController, InternalBrowserPoolOptions extends BrowserPoolOptions = BrowserPoolOptions, LaunchOptions extends Dictionary | undefined = Dictionary, Context extends BrowserCrawlingContext<Page, Response, ProvidedController, Dictionary> = BrowserCrawlingContext<Page, Response, ProvidedController, Dictionary>, ContextExtension = Dictionary<never>, ExtendedContext extends Context = Context & ContextExtension, GoToOptions extends Dictionary = Dictionary> extends BasicCrawler<Context, ContextExtension, ExtendedContext> {
188
196
  /**
189
197
  * A reference to the underlying {@link BrowserPool} class that manages the crawler's browsers.
190
198
  */
191
199
  browserPool: BrowserPool<InternalBrowserPoolOptions>;
192
200
  launchContext: BrowserLaunchContext<LaunchOptions, unknown>;
193
- protected userProvidedRequestHandler: BrowserRequestHandler<Context>;
201
+ protected readonly ignoreShadowRoots: boolean;
202
+ protected readonly ignoreIframes: boolean;
194
203
  protected navigationTimeoutMillis: number;
195
- protected requestHandlerTimeoutInnerMillis: number;
196
204
  protected preNavigationHooks: BrowserHook<Context>[];
197
205
  protected postNavigationHooks: BrowserHook<Context>[];
198
206
  protected persistCookiesPerSession: boolean;
@@ -218,9 +226,9 @@ export declare abstract class BrowserCrawler<InternalBrowserPoolOptions extends
218
226
  // @ts-ignore optional peer dependency or compatibility with es2022
219
227
  proxyConfiguration: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
220
228
  // @ts-ignore optional peer dependency or compatibility with es2022
221
- ignoreShadowRoots: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
229
+ contextPipelineBuilder: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
222
230
  // @ts-ignore optional peer dependency or compatibility with es2022
223
- ignoreIframes: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
231
+ extendContext: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
224
232
  // @ts-ignore optional peer dependency or compatibility with es2022
225
233
  requestList: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
226
234
  // @ts-ignore optional peer dependency or compatibility with es2022
@@ -241,6 +249,8 @@ export declare abstract class BrowserCrawler<InternalBrowserPoolOptions extends
241
249
  maxSessionRotations: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
242
250
  // @ts-ignore optional peer dependency or compatibility with es2022
243
251
  maxRequestsPerCrawl: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
252
+ // @ts-ignore optional peer dependency or compatibility with es2022
253
+ maxCrawlDepth: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
244
254
  // @ts-ignore optional peer dependency or compatibility with es2022
245
255
  autoscaledPoolOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
246
256
  // @ts-ignore optional peer dependency or compatibility with es2022
@@ -250,11 +260,17 @@ export declare abstract class BrowserCrawler<InternalBrowserPoolOptions extends
250
260
  // @ts-ignore optional peer dependency or compatibility with es2022
251
261
  retryOnBlocked: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
252
262
  // @ts-ignore optional peer dependency or compatibility with es2022
253
- respectRobotsTxtFile: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
263
+ respectRobotsTxtFile: import("ow").AnyPredicate<boolean | object>;
254
264
  // @ts-ignore optional peer dependency or compatibility with es2022
255
265
  onSkippedRequest: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
256
266
  // @ts-ignore optional peer dependency or compatibility with es2022
257
267
  httpClient: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
268
+ // @ts-ignore optional peer dependency or compatibility with es2022
269
+ configuration: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
270
+ // @ts-ignore optional peer dependency or compatibility with es2022
271
+ storageClient: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
272
+ // @ts-ignore optional peer dependency or compatibility with es2022
273
+ eventManager: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
258
274
  // @ts-ignore optional peer dependency or compatibility with es2022
259
275
  minConcurrency: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
260
276
  // @ts-ignore optional peer dependency or compatibility with es2022
@@ -269,34 +285,33 @@ export declare abstract class BrowserCrawler<InternalBrowserPoolOptions extends
269
285
  experiments: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
270
286
  // @ts-ignore optional peer dependency or compatibility with es2022
271
287
  statisticsOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
288
+ // @ts-ignore optional peer dependency or compatibility with es2022
289
+ id: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
272
290
  };
273
291
  /**
274
292
  * All `BrowserCrawler` parameters are passed via an options object.
275
293
  */
276
- protected constructor(options?: BrowserCrawlerOptions<Context>, config?: Configuration);
277
- protected _cleanupContext(crawlingContext: Context): Promise<void>;
294
+ protected constructor(options: BrowserCrawlerOptions<Page, Response, ProvidedController, Context, ContextExtension, ExtendedContext> & {
295
+ contextPipelineBuilder: () => ContextPipeline<CrawlingContext, Context>;
296
+ });
297
+ protected buildContextPipeline(): ContextPipeline<CrawlingContext, BrowserCrawlingContext<Page, Response, ProvidedController, Dictionary>>;
278
298
  private containsSelectors;
279
- protected isRequestBlocked(crawlingContext: Context): Promise<string | false>;
280
- /**
281
- * Wrapper around requestHandler that opens and closes pages etc.
282
- */
283
- protected _runRequestHandler(crawlingContext: Context): Promise<void>;
284
- protected _enhanceCrawlingContextWithPageInfo(crawlingContext: Context, page: CommonPage, createNewSession?: boolean): void;
285
- protected _handleNavigation(crawlingContext: Context): Promise<void>;
286
- protected _applyCookies({ session, request, page, browserController }: Context, preHooksCookies: string, postHooksCookies: string): Promise<void>;
299
+ protected isRequestBlocked(crawlingContext: BrowserCrawlingContext<Page, Response, ProvidedController>): Promise<string | false>;
300
+ private preparePage;
301
+ private performNavigation;
302
+ private handleBlockedRequestByContent;
303
+ private restoreRequestState;
304
+ protected _applyCookies({ session, request, page, browserController }: BrowserCrawlingContext, preHooksCookies: string, postHooksCookies: string): Promise<void>;
287
305
  /**
288
306
  * Marks session bad in case of navigation timeout.
289
307
  */
290
- protected _handleNavigationTimeout(crawlingContext: Context, error: Error): Promise<void>;
308
+ protected _handleNavigationTimeout(crawlingContext: BrowserCrawlingContext, error: Error): Promise<void>;
291
309
  /**
292
310
  * Transforms proxy-related errors to `SessionError`.
293
311
  */
294
312
  protected _throwIfProxyError(error: Error): void;
295
- protected abstract _navigationHandler(crawlingContext: Context, gotoOptions: GoToOptions): Promise<Context['response'] | null | undefined>;
296
- /**
297
- * Should be overridden in case of different automation library that does not support this response API.
298
- */
299
- protected _responseHandler(crawlingContext: Context): Promise<void>;
313
+ protected abstract _navigationHandler(crawlingContext: BrowserCrawlingContext<Page, Response, ProvidedController>, gotoOptions: GoToOptions): Promise<Context['response'] | null | undefined>;
314
+ private processResponse;
300
315
  protected _extendLaunchContext(_pageId: string, launchContext: LaunchContext): Promise<void>;
301
316
  protected _maybeAddSessionRetiredListener(_pageId: string, browserController: Context['browserController']): void;
302
317
  /**
@@ -316,8 +331,15 @@ interface EnqueueLinksInternalOptions {
316
331
  finalRequestUrl?: string;
317
332
  }
318
333
  /** @internal */
319
- // @ts-ignore optional peer dependency or compatibility with es2022
320
- export declare function browserCrawlerEnqueueLinks({ options, page, requestQueue, robotsTxtFile, onSkippedRequest, originalRequestUrl, finalRequestUrl, }: EnqueueLinksInternalOptions): Promise<import("@crawlee/types").BatchAddRequestsResult>;
334
+ interface BoundEnqueueLinksInternalOptions {
335
+ enqueueLinks: BasicCrawlingContext['enqueueLinks'];
336
+ options?: ReadonlyDeep<Omit<EnqueueLinksOptions, 'requestQueue'>> & Pick<EnqueueLinksOptions, 'requestQueue'>;
337
+ originalRequestUrl: string;
338
+ finalRequestUrl?: string;
339
+ page: CommonPage;
340
+ }
341
+ /** @internal */
342
+ export declare function browserCrawlerEnqueueLinks(options: EnqueueLinksInternalOptions | BoundEnqueueLinksInternalOptions): Promise<unknown>;
321
343
  /**
322
344
  * Extracts URLs from a given page.
323
345
  * @ignore
@@ -1 +1 @@
1
- {"version":3,"file":"browser-crawler.d.ts","sourceRoot":"","sources":["../../src/internals/browser-crawler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,SAAS,EACT,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,kBAAkB,EAElB,cAAc,EACd,eAAe,EAEf,sBAAsB,EACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEH,YAAY,EAEZ,aAAa,EAUhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACR,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,uBAAuB,EACvB,aAAa,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAA6B,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAI9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,MAAM,WAAW,sBAAsB,CACnC,OAAO,GAAG,OAAO,EACjB,IAAI,SAAS,UAAU,GAAG,UAAU,EACpC,QAAQ,GAAG,UAAU,EACrB,kBAAkB,GAAG,iBAAiB,EACtC,QAAQ,SAAS,UAAU,GAAG,UAAU,CAC1C,SAAQ,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC;IACxC,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,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