UNPKG

stepwright

Version:

A powerful web scraping library built with Playwright

35 lines 1.2 kB
import { TabTemplate, RunOptions } from './types'; export * from './types'; export * from './utils'; export * from './step-executor'; export * from './tab-executor'; /** * Run the scraper. * * @param {object} page - The page object. * @param {object} options - The options object. * * @since v1.0.0 * @author Muhammad Umer Farooq <umer@lablnet.com> * * @returns {object} - The data. * @since v1.0.0 * @company Framework Island */ export declare function runScraper(templates: TabTemplate[], options?: RunOptions): Promise<Record<string, any>[]>; /** * Run the scraper with a callback. This is a simpler alternative to async generators for real-time processing. * * @param {object} page - The page object. * @param {function} onResult - The onResult function. * @param {object} options - The options object. * * @since v1.0.0 * @author Muhammad Umer Farooq <umer@lablnet.com> * * @returns {void} - Nothing. * @since v1.0.0 * @company Framework Island */ export declare function runScraperWithCallback(templates: TabTemplate[], onResult: (result: Record<string, any>, index: number) => void | Promise<void>, options?: RunOptions): Promise<void>; //# sourceMappingURL=index.d.ts.map