@crawlee/cheerio 4.0.0-beta.134 → 4.0.0-beta.135
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.
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { AddRequestsBatchedResult, CrawlingContext, EnqueueLinksOptions, ErrorHandler, ExtractLinksOptions, GetUserDataFromRequest, HttpCrawlerOptions, InternalHttpCrawlingContext, InternalHttpHook, RequestHandler, RouterHandler, RouterRoutes, RouteSchemas, RoutesFromSchemas } from '@crawlee/http';
|
|
1
|
+
import type { AddRequestsBatchedResult, ContextPipeline, CrawlingContext, EnqueueLinksOptions, ErrorHandler, ExtractLinksOptions, GetUserDataFromRequest, HttpCrawlerOptions, InternalHttpCrawlingContext, InternalHttpHook, RequestHandler, RouterHandler, RouterRoutes, RouteSchemas, RoutesFromSchemas } from '@crawlee/http';
|
|
2
2
|
import { HttpCrawler } from '@crawlee/http';
|
|
3
3
|
import type { Dictionary } from '@crawlee/types';
|
|
4
|
-
import { type CheerioRoot } from '@crawlee/utils/internal';
|
|
5
4
|
import type { CheerioAPI } from 'cheerio';
|
|
6
5
|
import * as cheerio from 'cheerio';
|
|
7
6
|
export type CheerioErrorHandler<UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
|
|
@@ -51,7 +50,7 @@ JSONData extends Dictionary = any> extends InternalHttpCrawlingContext<UserData,
|
|
|
51
50
|
* });
|
|
52
51
|
* ```
|
|
53
52
|
*/
|
|
54
|
-
parseWithCheerio(selector?: string, timeoutMs?: number): Promise<
|
|
53
|
+
parseWithCheerio(selector?: string, timeoutMs?: number): Promise<CheerioAPI>;
|
|
55
54
|
/**
|
|
56
55
|
* Extracts URLs from the parsed HTML, without adding them to the request queue.
|
|
57
56
|
*/
|
|
@@ -147,16 +146,7 @@ export declare class CheerioCrawler<ContextExtension = Dictionary<never>, Extend
|
|
|
147
146
|
* All `CheerioCrawler` parameters are passed via an options object.
|
|
148
147
|
*/
|
|
149
148
|
constructor(options?: CheerioCrawlerOptions<ContextExtension, ExtendedContext, any, any, Routes, StatisticStateExtension>);
|
|
150
|
-
|
|
151
|
-
protected buildContextPipeline(): import("@crawlee/http").ContextPipeline<CrawlingContext<Dictionary>, InternalHttpCrawlingContext<any, any> & {
|
|
152
|
-
readonly body: string;
|
|
153
|
-
readonly $: CheerioAPI;
|
|
154
|
-
} & {
|
|
155
|
-
extractLinks: (options?: ExtractLinksOptions) => Promise<string[]>;
|
|
156
|
-
enqueueLinks: (options?: EnqueueLinksOptions) => Promise<AddRequestsBatchedResult>;
|
|
157
|
-
waitForSelector: (selector: string, _timeoutMs?: number) => Promise<void>;
|
|
158
|
-
parseWithCheerio: (selector?: string, timeoutMs?: number) => Promise<CheerioAPI>;
|
|
159
|
-
}>;
|
|
149
|
+
protected buildContextPipeline(): ContextPipeline<CrawlingContext, CheerioCrawlingContext>;
|
|
160
150
|
private parseContent;
|
|
161
151
|
private addHelpers;
|
|
162
152
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/cheerio",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.135",
|
|
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"
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@crawlee/http": "4.0.0-beta.
|
|
51
|
-
"@crawlee/types": "4.0.0-beta.
|
|
52
|
-
"@crawlee/utils": "4.0.0-beta.
|
|
50
|
+
"@crawlee/http": "4.0.0-beta.135",
|
|
51
|
+
"@crawlee/types": "4.0.0-beta.135",
|
|
52
|
+
"@crawlee/utils": "4.0.0-beta.135",
|
|
53
53
|
"cheerio": "^1.0.0",
|
|
54
54
|
"htmlparser2": "^10.0.0",
|
|
55
55
|
"tslib": "^2.8.1"
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "ca0325880bbcc753d97506796e9bda3b35bca201"
|
|
65
65
|
}
|