From 555d2ad44fa69af4b063e3f04311e1280e5f0299 Mon Sep 17 00:00:00 2001 From: feliciaan Date: Tue, 13 May 2014 12:30:00 +0200 Subject: [PATCH] better syntax --- scraper/resto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scraper/resto.py b/scraper/resto.py index e677289a..2e30d5d6 100755 --- a/scraper/resto.py +++ b/scraper/resto.py @@ -64,7 +64,7 @@ def __init__(self, date): self.vegetables = [] def parse(self, menu_div, lang): - titles = [x.content.lower() for x in menu_div.xpathEval('./h3') if len(x.content) > 0] + titles = [x.content.lower() for x in menu_div.xpathEval('./h3') if x.content] lists = menu_div.xpathEval('./ul[*]') if len(titles) == 1 and titles[0] == DICTIONARY[lang]['closed']: