@dimfu/recipe-scraper
Version:
Extract recipe data from the web effortlessly
30 lines (27 loc) • 868 B
TypeScript
interface Options {
maxRedirects?: number;
lang?: string;
timeout?: number;
html?: string;
url?: string;
}
interface IRecipe {
url: string;
name: string;
image: string;
description: string;
cookTime: string;
prepTime: string;
totalTime: string;
recipeYield: string;
recipeIngredients: string[];
recipeInstructions: string[];
recipeCategories: string[];
recipeCuisines: string[];
keywords: string[];
}
declare function consolidateRecipeProperties(recipe: Record<string, any>): IRecipe;
interface ConsilidatedRecipe extends ReturnType<typeof consolidateRecipeProperties> {
}
declare function getRecipeData(input: string | Partial<Options>, inputOptions?: Partial<Options>): Promise<ConsilidatedRecipe | undefined>;
export { ConsilidatedRecipe, getRecipeData as default };