marmiteur

Last updated:

0 purchases

marmiteur Image
marmiteur Images
Add to Cart

Description:

marmiteur

Extract recipe details given a URL.
Getting started #
import 'package:marmiteur/marmiteur.dart';

void main() async {
String recipeURL = "https://www.marmiton.org/recettes/recette_burger-d-avocat_345742.aspx";
var recipe = await marmiteur(recipeURL);
print(recipe['name']);
print(recipe['recipeIngredient']);
print(recipe['recipeInstructions']);
print(recipe['image']);
}
copied to clipboard
Also look at pub.dev/packages/marmiteur package installation instructions.
Usage #
var recipe = await marmiteur(recipeURL); // recipeURL is a String
var recipe = await marmiteur(recipeURL, autoFormat = false); // unformated output
copied to clipboard
The main function marmiteur() returns a HashMap of all scrapped informations about the recipe. The keys it can be called with are listed in the following table. (Almost all self-explanatory.)
Be aware that the default type refers to the one outputed when using autoFormat=true in the main marmiteur() function (by default).



Key
Default type
Value description




name
String
Name of the recipe


recipeCategory
List
Recipe category (cocktail, chili...)


recipeCuisine
List
Cuisine type (starter, main course, dessert...)


image
List
Link to a photograph of the meal (if any)


video
List
Link to an instruction video (if any)


prepTime
String
-


cookTime
String
-


totalTime
String
prepTime + cookTime


recipeYield
List
Portion (Number of persons to eat)


recipeIngredient
List
-


recipeInstructions
List
-


author
String
-


description
String
-


keywords
List
-


datePublished
String
Publication date



Additional information #
Version 3.0.0 works for a limited number of websites but should be enough for the painful work.
Feel free to contribute to this package to expand it.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.