Skip to content

Commit

Permalink
fixed errors with empty h3 that float around
Browse files Browse the repository at this point in the history
  • Loading branch information
feliciaan committed May 13, 2014
1 parent b5ca958 commit 1312c77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scraper/resto.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def __init__(self, date):
self.vegetables = []

def parse(self, menu_div, lang):
titles = [x.content.lower() for x in menu_div.xpathEval('./h3')]
titles = [x.content.lower() for x in menu_div.xpathEval('./h3') if len(x.content) > 0]
print(titles)
lists = menu_div.xpathEval('./ul[*]')

if len(titles) == 1 and titles[0] == DICTIONARY[lang]['closed']:
Expand Down

0 comments on commit 1312c77

Please sign in to comment.