diff --git a/modules/750g/pages.py b/modules/750g/pages.py index c81f0577d2d9025e707a070414a3d448082395ae..f141a88da721584734da30bfec13e11c59236fe9 100644 --- a/modules/750g/pages.py +++ b/modules/750g/pages.py @@ -96,7 +96,7 @@ def get_recipe(self, id): cooking_time = 60*cooking_time if 'Nombre de personnes' in info_title.text: if info_title.tail.strip() != '': - nb_person = int(info_title.tail) + nb_person = [int(info_title.tail)] ingredients = [] p_ing = self.parser.select(main, 'div.data.top.left > div.content p') diff --git a/modules/allrecipes/pages.py b/modules/allrecipes/pages.py index a0dc6a538835f9aca00ac7e1da1b0ffba618e9f6..f127de56f702a3356bd4019669cbf9ebff62d550 100644 --- a/modules/allrecipes/pages.py +++ b/modules/allrecipes/pages.py @@ -112,7 +112,7 @@ def get_recipe(self, id): cooking_time = cookmin l_nbpers = self.parser.select(self.document.getroot(), 'span#lblYield[itemprop=recipeYield]') if len(l_nbpers) > 0: - nb_person = int(l_nbpers[0].text.split()[0]) + nb_person = [int(l_nbpers[0].text.split()[0])] recipe = Recipe(id, title) recipe.preparation_time = preparation_time diff --git a/modules/cuisineaz/pages.py b/modules/cuisineaz/pages.py index 1066feaf6ffdf1429480b48843fd3b1517255f5b..a85a9c8e96ab080b5b51d0a05599e9fe4d411cba 100644 --- a/modules/cuisineaz/pages.py +++ b/modules/cuisineaz/pages.py @@ -107,9 +107,9 @@ def get_recipe(self, id): rawnb = l_nbpers[0].text.split()[0] if '/' in rawnb: nbs = rawnb.split('/') - nb_person = (int(nbs[0]) + int(nbs[1])) / 2 + nb_person = [int(nbs[0]), int(nbs[1])] else: - nb_person = int(rawnb) + nb_person = [int(rawnb)] ingredients = [] l_ing = self.parser.select(main, 'div#ingredients li.ingredient') diff --git a/modules/marmiton/pages.py b/modules/marmiton/pages.py index 8ea6eaf3b59fdd2d0d359d090f3e5c15a620f83d..18ce42c162963af302b60d933f9392ac74558c8e 100644 --- a/modules/marmiton/pages.py +++ b/modules/marmiton/pages.py @@ -76,7 +76,7 @@ def get_recipe(self, id): cooking_time = int(self.parser.select(main, 'p.m_content_recette_info span.cooktime', 1).text_content()) ing_header_line = self.parser.select(main, 'p.m_content_recette_ingredients span', 1).text_content() if '(pour' in ing_header_line and ')' in ing_header_line: - nb_person = int(ing_header_line.split('pour ')[-1].split('personnes)')[0].split()[0]) + nb_person = [int(ing_header_line.split('pour ')[-1].split('personnes)')[0].split()[0])] ingredients = self.parser.select(main, 'p.m_content_recette_ingredients', 1).text_content().strip().split('- ') ingredients = ingredients[1:] rinstructions = self.parser.select(main, 'div.m_content_recette_todo', 1).text_content().strip()