fixed a possible issue with the mensa parser

This commit is contained in:
Jannik 2019-01-04 23:58:54 +01:00
parent 75a457312d
commit ffeb09a37f
1 changed files with 1 additions and 5 deletions

View File

@ -26,16 +26,12 @@ import org.jsoup.Jsoup
import java.util.*
class MensaParser {
private var mealList = ArrayList<Meal>()
init {
// do something
}
/**
* returns the mensa menu for the whole week
*/
fun getMensaMenu(): ArrayList<Meal> {
val mealList = ArrayList<Meal>()
val menuHTML = Jsoup.connect("https://www.swfr.de/de/essen-trinken/speiseplaene/mensa-offenburg/").get()
menuHTML.select("#speiseplan-tabs").select("div.tab-content").select("div.menu-tagesplan").forEachIndexed { _, element ->