update all existing courses every 3 hours & some clean up
This commit is contained in:
@ -43,16 +43,13 @@ class MensaParser {
|
||||
val heading = day.select("h4")[mealIndex].text()
|
||||
val parts = ArrayList(meal.html().substringBefore("<br>\n").replace("\n", "").split("<br>"))
|
||||
val additives = meal.select("span.show-with-allergenes").text()
|
||||
parts.removeIf { x -> x.isEmpty()|| x.isBlank() }
|
||||
parts.removeIf { x -> x.isEmpty() || x.isBlank() }
|
||||
|
||||
mealWeekList.days[dayIndex].meals.add(Meal(strDay, heading, parts, additives))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Mon to Sat (0 - 5)
|
||||
//println(mealWeekList.days[4])
|
||||
|
||||
return mealWeekList
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ class TimetableParser {
|
||||
var day = 0
|
||||
|
||||
// elements are now all lessons, including empty ones
|
||||
row.select("td.lastcol, td[style]").forEachIndexed {elementIndex, element ->
|
||||
row.select("td.lastcol, td[style]").forEachIndexed { elementIndex, element ->
|
||||
|
||||
// if there is a lecture with rowspan="2", we need to shift everything by one to the left. This is stupid and ugly there needs to bee an API
|
||||
if ((sDay > -1 && sRow > -1) && (sDay == day && ((sRow + 1) == rowIndex))) {
|
||||
|
Reference in New Issue
Block a user