UNPKG

@waynechang65/ptt-crawler

Version:

A web crawler module designed to scarp data from Ptt.

21 lines (20 loc) 647 B
import { type LaunchOptions } from 'puppeteer'; interface CrawlerOptions { pages?: number; board?: string; skipPBs?: undefined | boolean; getContents?: undefined | boolean; } export interface MergedPages { titles: string[]; urls: string[]; rates: string[]; authors: string[]; dates: string[]; marks: string[]; contents?: string[]; } declare function _initialize(options: LaunchOptions): Promise<void>; declare function _getResults(options: CrawlerOptions): Promise<MergedPages>; declare function _close(): Promise<void>; export { _initialize as initialize, _getResults as getResults, _close as close };