UNPKG

syphonx-core

Version:

SyphonX is a template-driven solution for extracting data from HTML in a highly efficient way. It combines the power of jQuery, Regular Expressions, and Javascript into a declarative template-driven format that extracts and reshapes HTML data into JSON.

41 lines (40 loc) 944 B
import { DocumentLoadState } from "./DocumentLoadState.js"; import { LocatorMethod } from "./Locator.js"; import { When } from "./When.js"; export interface Yield { name?: string; params?: YieldParams; when?: When; } export interface YieldParams extends Record<string, unknown> { timeout?: number; waitUntil?: DocumentLoadState; click?: {}; goback?: {}; locators?: YieldLocator[]; navigate?: YieldNavigate; reload?: {}; screenshot?: YieldScreenshot; } export interface YieldLocator { name: string; selector: string; method: LocatorMethod; params?: unknown[]; frame?: string; } export interface YieldNavigate { url: string; } export interface YieldScreenshot { [key: string]: unknown; name?: string; selector?: string; fullPage?: boolean; } export interface YieldState { step: number[]; params?: YieldParams; level?: number; result?: unknown; }