UNPKG

maxun-core

Version:

Core package for Maxun, responsible for data extraction

18 lines (17 loc) 918 B
declare function getBiggestElement(selector: any): any; /** * Generates structural selector (describing element by its DOM tree location). * * **The generated selector is not guaranteed to be unique!** (In fact, this is * the desired behaviour in here.) * @param {HTMLElement} element Element being described. * @returns {string} CSS-compliant selector describing the element's location in the DOM tree. */ declare function GetSelectorStructural(element: HTMLElement): string; /** * Heuristic method to find collections of "interesting" items on the page. * @returns {Array<HTMLElement>} A collection of interesting DOM nodes * (online store products, plane tickets, list items... and many more?) */ declare function scrapableHeuristics(maxCountPerPage?: number, minArea?: number, scrolls?: number, metricType?: string): Array<HTMLElement>; declare function area(element: any): number;