Commit a48bed0c authored by Julien Veyssier's avatar Julien Veyssier

[cuisineaz] temporary fix of person number range

parent fb39dcd8
......@@ -18,7 +18,7 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.capabilities.recipe import Recipe, Comment
from weboob.capabilities.recipe import Recipe
from weboob.capabilities.base import NotAvailable, NotLoaded
from weboob.tools.browser import BasePage
......
......@@ -104,7 +104,12 @@ class RecipePage(BasePage):
cooking_time = int(l_cooktime[0].text.split()[0])
l_nbpers = self.parser.select(main, 'td#recipeQuantity span')
if len(l_nbpers) > 0:
nb_person = int(l_nbpers[0].text.split()[0])
rawnb = l_nbpers[0].text.split()[0]
if '/' in rawnb:
nbs = rawnb.split('/')
nb_person = (int(nbs[0]) + int(nbs[1])) / 2
else:
nb_person = int(rawnb)
ingredients = []
l_ing = self.parser.select(main, 'div#ingredients li.ingredient')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment