crawlerzzz
Version:
34 lines (33 loc) • 805 B
TypeScript
export declare type LiveCrawlerOptions = {
domain?: string;
processPage: Function;
startFrom?: string;
noDuplicatedLink?: boolean;
manualLogin?: boolean;
secondsWaitForLogin?: number;
rateLimit?: number;
exitOnIdleSeconds?: number;
launchConfig?: object;
pageConfig?: {
viewport: {
width: number;
height: number;
};
};
};
export declare type LinkType = {
url: string;
data?: any;
};
declare const liveCrawler: (opts: LiveCrawlerOptions) => Promise<{
pageSource$: import("rxjs").Observable<{
src: string;
url: string;
data: any;
}>;
link$: import("rxjs").Observable<{
url: string;
}>;
queueLink: (url: string, data?: any) => any;
}>;
export default liveCrawler;