@devmehq/open-graph-extractor
Version:
Fast, lightweight Open Graph, Twitter Card, and structured data extractor for Node.js with caching and validation
28 lines (27 loc) • 817 B
TypeScript
import type * as cheerio from "cheerio";
import type { IOgImage } from "./media";
interface IFallbackOptions {
allMedia?: boolean;
ogImageFallback?: boolean;
customMetaTags?: ConcatArray<{
multiple: boolean;
property: string;
fieldName: string;
}>;
onlyGetOpenGraphInfo?: boolean;
}
export interface IFallbackOgObject {
ogTitle?: string;
ogDescription?: string;
ogImage?: IOgImage | IOgImage[] | string | string[];
ogAudioURL?: string;
ogAudioSecureURL?: string;
ogAudioType?: string;
ogLocale?: string;
ogLogo?: string;
ogUrl?: string;
ogDate?: string;
favicon?: string;
}
export declare function fallback(ogObject: IFallbackOgObject, options: IFallbackOptions | undefined, $: cheerio.CheerioAPI): IFallbackOgObject;
export {};