Ignore rows not containing any collectable data
This commit is contained in:
parent
7b3e750513
commit
678d00a57b
@ -151,6 +151,10 @@ var connection_result_observer = new MutationObserver((mutations) => {
|
|||||||
var relations = timetable.querySelectorAll("tr.first");
|
var relations = timetable.querySelectorAll("tr.first");
|
||||||
relations.forEach((relation, i) => {
|
relations.forEach((relation, i) => {
|
||||||
var relationend = relation.nextElementSibling;
|
var relationend = relation.nextElementSibling;
|
||||||
|
while(relationend.querySelector("td.station") == null) {
|
||||||
|
relationend = relationend.nextElementSibling;
|
||||||
|
}
|
||||||
|
|
||||||
data[i] = {};
|
data[i] = {};
|
||||||
data[i]["from"] = {}
|
data[i]["from"] = {}
|
||||||
data[i]["to"] = {}
|
data[i]["to"] = {}
|
||||||
@ -240,6 +244,9 @@ var connection_result_observer = new MutationObserver((mutations) => {
|
|||||||
var relations = timetable.querySelectorAll("tr.first");
|
var relations = timetable.querySelectorAll("tr.first");
|
||||||
relations.forEach((relation, i) => {
|
relations.forEach((relation, i) => {
|
||||||
var relationend = relation.nextElementSibling;
|
var relationend = relation.nextElementSibling;
|
||||||
|
while(relationend.querySelector("td.station") == null) {
|
||||||
|
relationend = relationend.nextElementSibling;
|
||||||
|
}
|
||||||
|
|
||||||
var products = relation.querySelectorAll("td.products span a");
|
var products = relation.querySelectorAll("td.products span a");
|
||||||
products.forEach((product, j) => {
|
products.forEach((product, j) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user