[cuisineaz] temporary fix of person number range
This commit is contained in:
parent
fb39dcd825
commit
a48bed0cf0
2 changed files with 7 additions and 2 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue