fix MensaParser & update spring boot, kotlin
* fixed the MensaParser(), it should now work more reliable * updated spring boot 2.2.4 -> 2.2.5 * updated kotlin 1.3.61 -> 1.3.70 * clean up MensaParserTest
This commit is contained in:
@ -63,9 +63,9 @@ class MensaParser {
|
||||
.forEachIndexed { dayIndex, day ->
|
||||
val strDay = day.select("h3").text()
|
||||
|
||||
day.select("div.menu-info").forEachIndexed { mealIndex, meal ->
|
||||
val heading = day.select("h4")[mealIndex].text()
|
||||
val parts = ArrayList(meal.html().substringBefore("<br>\n").replace("\n", "").split("<br>"))
|
||||
day.select("div.row").forEachIndexed { mealIndex, meal ->
|
||||
val heading = meal.select("h4.menu-header").text()
|
||||
val parts = ArrayList(meal.select("div.menu-info").html().substringBefore("<br><span").replace("\n", "").split("<br>"))
|
||||
val additives = meal.select("span.show-with-allergenes").text()
|
||||
parts.removeIf { x -> x.isEmpty() || x.isBlank() }
|
||||
|
||||
|
Reference in New Issue
Block a user