marmiteur 3.0.0 copy "marmiteur: ^3.0.0" to clipboard
marmiteur: ^3.0.0 copied to clipboard

Receive recipe details given a URL.

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']);
}

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

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.

3
likes
120
points
54
downloads

Publisher

unverified uploader

Weekly Downloads

Receive recipe details given a URL.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

beautiful_soup_dart, collection, http

More

Packages that depend on marmiteur