crawlee-linkedom.api
Public API Report File for "@crawlee/linkedom"
Do not edit this file. It is a report generated by API Extractor.
import type { AddRequestsBatchedResult } from '@crawlee/http';
import type { CheerioAPI } from 'cheerio';
import type { ContextPipeline } from '@crawlee/http';
import type { CrawlingContext } from '@crawlee/http';
import type { Dictionary } from '@crawlee/types';
import type { EnqueueLinksOptions } from '@crawlee/http';
import type { ErrorHandler } from '@crawlee/http';
import type { ExtractLinksOptions } from '@crawlee/http';
import type { GetUserDataFromRequest } from '@crawlee/http';
import { HttpCrawler } from '@crawlee/http';
import type { HttpCrawlerOptions } from '@crawlee/http';
import type { InternalHttpCrawlingContext } from '@crawlee/http';
import type { InternalHttpHook } from '@crawlee/http';
import type { RequestHandler } from '@crawlee/http';
import type { RouterHandler } from '@crawlee/http';
import type { RouterRoutes } from '@crawlee/http';
import type { RouteSchemas } from '@crawlee/http';
import type { RoutesFromSchemas } from '@crawlee/http';
// @public
export function createLinkeDOMRouter<Context extends LinkeDOMCrawlingContext = LinkeDOMCrawlingContext, Routes extends Record<keyof Routes, Dictionary> = Record<string, GetUserDataFromRequest<Context['request']>>>(routes?: RouterRoutes<Context, Routes>): RouterHandler<Context, Routes>;
// @public (undocumented)
export function createLinkeDOMRouter<Context extends LinkeDOMCrawlingContext = LinkeDOMCrawlingContext, UserData extends Dictionary = GetUserDataFromRequest<Context['request']>>(routes?: RouterRoutes<Context, Record<string, UserData>>): RouterHandler<Context, Record<string, UserData>>;
// @public (undocumented)
export function createLinkeDOMRouter<Context extends LinkeDOMCrawlingContext = LinkeDOMCrawlingContext, const Schemas extends RouteSchemas = RouteSchemas>(schemas: Schemas): RouterHandler<Context, RoutesFromSchemas<Schemas>>;
// @public
export class LinkeDOMCrawler<ContextExtension = Dictionary<never>, ExtendedContext extends LinkeDOMCrawlingContext = LinkeDOMCrawlingContext & ContextExtension, Routes extends Record<keyof Routes, Dictionary> = Record<string, GetUserDataFromRequest<LinkeDOMCrawlingContext['request']>>, StatisticStateExtension extends object = {}> extends HttpCrawler<LinkeDOMCrawlingContext, ContextExtension, ExtendedContext, Routes, StatisticStateExtension> {
constructor(options?: LinkeDOMCrawlerOptions<ContextExtension, ExtendedContext, any, any, Routes, StatisticStateExtension>);
// (undocumented)
protected buildContextPipeline(): ContextPipeline<CrawlingContext, LinkeDOMCrawlingContext>;
}
// @public (undocumented)
export interface LinkeDOMCrawlerOptions<ContextExtension = Dictionary<never>, ExtendedContext extends LinkeDOMCrawlingContext = LinkeDOMCrawlingContext & ContextExtension, UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
JSONData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
Routes extends Record<keyof Routes, Dictionary> = Record<string, UserData>, StatisticStateExtension extends object = {}> extends HttpCrawlerOptions<LinkeDOMCrawlingContext<UserData, JSONData>, ContextExtension, ExtendedContext, Routes, StatisticStateExtension> {
}
// @public (undocumented)
export interface LinkeDOMCrawlingContext<UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
JSONData extends Dictionary = any> extends InternalHttpCrawlingContext<UserData, JSONData> {
// (undocumented)
document: Document;
enqueueLinks(options?: EnqueueLinksOptions): Promise<AddRequestsBatchedResult>;
extractLinks(options?: ExtractLinksOptions): Promise<string[]>;
parseWithCheerio(selector?: string, timeoutMs?: number): Promise<CheerioAPI>;
waitForSelector(selector: string, timeoutMs?: number): Promise<void>;
// (undocumented)
window: Window;
}
// @public (undocumented)
export type LinkeDOMErrorHandler<UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
JSONData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
ContextExtension = Dictionary<never>> = ErrorHandler<CrawlingContext, LinkeDOMCrawlingContext<UserData, JSONData> & ContextExtension>;
// @public (undocumented)
export type LinkeDOMHook<UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
JSONData extends Dictionary = any> = InternalHttpHook<LinkeDOMCrawlingContext<UserData, JSONData>>;
// @public (undocumented)
export type LinkeDOMRequestHandler<UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
JSONData extends Dictionary = any> = RequestHandler<LinkeDOMCrawlingContext<UserData, JSONData>>;
export * from "@crawlee/http";
// (No @packageDocumentation comment for this package)