UNPKG

nurlresolver

Version:
35 lines (34 loc) 1.75 kB
export declare const parseHiddenForm: (html: string, ix?: number) => ScrapedForm; export declare const parseHiddenFormV2: (html: string, ix?: number) => Record<string, string> | undefined; export declare const getServerPublicIp: () => Promise<string>; export declare const wait: (ms: number) => Promise<unknown>; export declare const nodeatob: (str: string) => string; export declare const nodebtoa: (str: string) => string; export declare const parseForms: (html: string) => { output: ScrapedForm[]; }; export declare const transformScrapedFormToFormData: (scrapedForm: ScrapedForm) => Record<string, string> | undefined; export declare const parseAllLinks: (html: string, context: string, baseUrl?: string) => ScrapedAnchorElement[]; export declare const parseElementAttributes: (html: string, context: string, attribute: string) => string[]; export declare const parseScripts: (html: string, context?: string) => string[]; export declare const scrapeLinkHref: (html: string, selector: string) => string; export declare const scrapePageTitle: (html: string) => string; export declare const scrapeInnerText: (html: string, selector: string) => string; export declare const getSecondLevelDomain: (someUrl: string) => string | null; export declare const isValidHttpUrl: (someUrl: string) => boolean; export declare const extractFileNameFromUrl: (someUrl: string) => string; export interface ScrapedForm { action: string; kv: [ { name: string; value: string; } ]; } export interface ScrapedAnchorElement { link: string; title: string; } export declare const parseGoogleFileId: (_url: string) => string | null; export declare const simpleCaptcha: (html: string, listItem: string) => string;