@fcc-cdc/it-events
Version:
IT Events Crawler of China
16 lines (15 loc) • 543 B
TypeScript
export declare const textOf: (node?: Element | null) => string;
export declare const textFrom: (root: ParentNode | null, selector: string) => string;
export declare abstract class DataCrawler<T> {
['constructor']: typeof DataCrawler;
static baseURI: string;
static schema: URLPattern;
abstract getList(URI: string): AsyncGenerator<T>;
abstract getItem(URI: string): Promise<T>;
makeYAML(list: T[]): string;
saveList(URI: string): Promise<{
list: T[];
folder: string;
file: string;
}>;
}