source-scraper-html-runner
Version:
Provides the HtmlRunner class for scrapping.
16 lines (15 loc) • 756 B
TypeScript
import { IRunner, IRunnerArgs, IRunnerOptions, Runner } from 'source-scraper-core';
import { AxiosRequestConfig, AxiosResponse } from 'axios';
export interface IHtmlRunnerOptions extends IRunnerOptions {
axiosConfig: AxiosRequestConfig;
}
export interface IHtmlRunnerArgs extends IRunnerArgs<IHtmlRunnerOptions> {
html: string;
response: AxiosResponse;
}
export interface IHtmlRunner<T> extends IRunner<T, IHtmlRunnerOptions, IHtmlRunnerArgs> {
}
export declare class HtmlRunner<T> extends Runner<T, IHtmlRunnerOptions, IHtmlRunnerArgs> implements IHtmlRunner<T> {
defaultOptions: IHtmlRunnerOptions;
protected exec(url: string, scraper: (args: IHtmlRunnerArgs) => Promise<T>, options: IHtmlRunnerOptions): Promise<T>;
}