--- android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureFetcher.java 2010/08/25 06:18:13 1019 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureFetcher.java 2010/08/30 11:53:34 1020 @@ -128,9 +128,22 @@ if (table != null) { Elements tableRows = table.getElementsByTag("tr"); + boolean tidsstregExists = (table.getElementsByAttributeValue("class", "Tidsstreg").size() > 0); + boolean passedTidsstreg = false; + for (Element currentRow : tableRows) { String rowClass = currentRow.attr("class"); + + if (tidsstregExists == true && passedTidsstreg == false) { + if (currentRow.getElementsByAttributeValue("class", "Tidsstreg").size() > 0) { + passedTidsstreg = true; + } else { + continue; + } + } + if (rowClass != null && rowClass.toLowerCase().contains("station") ) { + Elements fields = currentRow.getElementsByTag("td"); DepartureEntry departure = new DepartureEntry();