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['ingredients']);
print(recipe['instructions']);
print(recipe['image']);
}
Usage
var recipe = await marmiteur(recipeURL);
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.)
Key | Type | Value description |
---|---|---|
name |
String | Name of the recipe |
category |
String | Recipe category (cocktail, chili...) |
cuisine |
String | Cuisine type (starter, main course, dessert...) |
image |
List | Link to a photograph of the meal |
prepTime |
String | - |
cookTime |
String | |
totalTime |
String | prepTime + cookTime |
portion |
String | Eaters number |
ingredients |
List | - |
instructions |
List | - |
author |
String | - |
description |
String | - |
keywords |
String | - |
rating |
String | - |
date |
String | Publication date |
Additional information
Version 1.0.0
only works for a limited number of website.
Feel free to contribute to this package to expand it.