Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/backend/FiveTScraperFetcher.java
Show First 20 Lines • Show All 153 Lines • ▼ Show 20 Lines | // ); | ||||
//boolean isInRealTime = td.select("i").size() > 0; | //boolean isInRealTime = td.select("i").size() > 0; | ||||
//td.select("i").remove(); // Stripping "*" | //td.select("i").remove(); // Stripping "*" | ||||
String time = td.text().trim(); | String time = td.text().trim(); | ||||
if (time.equals("")) { | if (time.equals("")) { | ||||
// Yes... Sometimes there is an EMPTY td ._. | // Yes... Sometimes there is an EMPTY td ._. | ||||
continue; | continue; | ||||
} | } | ||||
p.addPassaggio(time, Passaggio.Source.FiveTScraper,routeIndex); | p.addPassaggio(time, Passaggio.Source.FiveTScraper, routeIndex); | ||||
} | } | ||||
} | } | ||||
p.sortRoutes(); | p.sortRoutes(); | ||||
res.set(result.OK); | res.set(result.OK); | ||||
return p; | return p; | ||||
} | } | ||||
@Override | |||||
public Passaggio.Source getSourceForFetcher() { | |||||
return Passaggio.Source.FiveTScraper; | |||||
} | |||||
// preserved for future generations: | // preserved for future generations: | ||||
// /* | // /* | ||||
// * I've sent many emails to the public email info@5t.torino.it to write down something like: | // * I've sent many emails to the public email info@5t.torino.it to write down something like: | ||||
// * «YOUR SITE EXPLODE IF I USE **YOUR** BUS LINE IDs STARTING WITH ZERO!!!!!» | // * «YOUR SITE EXPLODE IF I USE **YOUR** BUS LINE IDs STARTING WITH ZERO!!!!!» | ||||
// * So, waiting for a response, I must purge the busStopID from "0"s .__. | // * So, waiting for a response, I must purge the busStopID from "0"s .__. | ||||
// * IN YOUR FACE 5T/GTT. IN YOUR FACE. | // * IN YOUR FACE 5T/GTT. IN YOUR FACE. | ||||
// * | // * | ||||
// * @param busStopID | // * @param busStopID | ||||
Show All 28 Lines |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register