Skip to content
Snippets Groups Projects
Commit 59980abd authored by root's avatar root
Browse files

minimal kategorie stuff:

parent 426a6b48
No related branches found
No related tags found
No related merge requests found
......@@ -10,9 +10,10 @@ def parseDay( dom, dayName ):
date = dom.find('a[href="#'+dayName+'"]').first().text()[-10:]
day = dom.find("div#"+dayName).first().find("tbody").find("tr")
for tr in range(day.length()):
gericht = re.sub(r'\([\d+,]+\)', '', day[tr].find("td")[0].text())
art = day[tr].find("td")[1].text()
kategorie = day[tr].find("td")[2].text()
tds = day[tr].find("td");
gericht = re.sub(r'\([\d+,]+\)', '', tds[0].text())
art = tds[1].text()
kategorie = tds[2].find("img").first().attr( "src" )
gerichte.append({'gericht': gericht,"art": art,"kategorie":kategorie})
jday = {'date': date,"gerichte":gerichte}
return jday
......@@ -26,4 +27,4 @@ result = {
}
with io.open('mensaPlan.json', 'w', encoding='utf-8') as f:
f.write(unicode(json.dumps(result))) #fixUnicodeProblem
f.write(unicode(json.dumps(result)))
This diff is collapsed.
......@@ -24,10 +24,10 @@ this.loaded = function(panel, config) {
var cell3 = row.insertCell(2);
cell1.innerHTML = gericht.gericht;
cell2.innerHTML = gericht.art;
cell3.innerHTML = gericht.kategorie;
cell3.innerHTML = '<img src="'+gericht.kategorie+'" />';
}
}
getMensaPlan();
fillTable();
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment