Commit 884f1bda authored by Volker Krause's avatar Volker Krause
Browse files

Fix SNCF extractor blocking JSON-LD results by producing invalid output

parent 0778db02
......@@ -151,7 +151,10 @@ function parseHtmlConfirmation(html)
res.reservationFor.arrivalTime = JsonLd.toDateTime(dt + segmentDetail.content, "d MMMMhh'h'mm", "fr");
segmentDetail = segmentDetail.nextSibling;
res.reservationFor.arrivalStation.name = segmentDetail.content;
reservations.push(res);
// HACK drop invalid elements so the structured fallback kicks in correctly
// this should be done automatically in the engine
if (res.reservationFor.departureTime > 0)
reservations.push(res);
}
else if (cls === "segment") {
res.reservationFor.trainName = segmentDetail.content;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment