|
@@ -113,10 +113,10 @@ class CampusravitaHTMLParser(html.parser.HTMLParser):
|
113
|
113
|
self.lunch_type_match = bool(lunch_match)
|
114
|
114
|
|
115
|
115
|
def handle_menu_start(self):
|
116
|
|
- print("*********** menu start")
|
|
116
|
+ pass
|
117
|
117
|
|
118
|
118
|
def handle_menu_end(self):
|
119
|
|
- print("*********** menu end")
|
|
119
|
+ pass
|
120
|
120
|
|
121
|
121
|
def handle_allergy(self, data):
|
122
|
122
|
data = data.strip()
|
|
@@ -136,12 +136,11 @@ class CampusravitaHTMLParser(html.parser.HTMLParser):
|
136
|
136
|
|
137
|
137
|
def handle_lunch_start(self):
|
138
|
138
|
if self.lunch_type_match:
|
139
|
|
- print("lunch start")
|
140
|
139
|
self.lunch = {"food": [], "allergies": []}
|
141
|
140
|
|
142
|
141
|
def handle_lunch_end(self):
|
143
|
142
|
if self.lunch:
|
144
|
|
- print(repr(self.lunch).encode("cp1252", "ignore"))
|
|
143
|
+ #print(repr(self.lunch).encode("cp1252", "ignore"))
|
145
|
144
|
menu = "{menu} ({allergies})".format(menu=self.lunch["food"][0], allergies=", ".join(self.lunch["allergies"]))
|
146
|
145
|
self.current_day.append(menu)
|
147
|
146
|
self.lunch = None
|