The issue is with TransportAPI and I’ve contacted their support with the following info:
I get the following info (snippet):
departures:
{
44:
[
{
mode: "bus",
line: "44",
line_name: "44",
direction: "Victoria",
operator: "LONDONBUS",
date: "2017-07-25",
expected_departure_date: "2017-07-25",
aimed_departure_time: "09:18",
expected_departure_time: "09:18",
best_departure_estimate: "09:18",
source: "Countdown instant",
dir: "inbound",
id: "https://transportapi.com/v3/uk/bus/route/LONDONBUS/44/inbound/490013443E/2017-07-25/09:18/timetable.json?app_id=a111aa11&app_key=1a11111a1111aaa11a1a1111a11111a1",
operator_name: "London Buses"
},
I get the following info (snippet):
{
mode: "bus",
line: "44",
line_name: "44",
direction: "Victoria",
operator: "TFL",
date: "2017-07-25",
expected_departure_date: "2017-07-25",
aimed_departure_time: "00:45",
expected_departure_time: "09:18",
best_departure_estimate: "09:18",
source: "Countdown instant",
dir: null,
id: null,
operator_name: null
},
Same bus, same info except the aimed_departure_time that is now 00:45. This means that when I calculate the delay, I get hundreds of minutes and the bus never drops out of the results.
So the issue appears to be with the ‘group=no’ URL variable.
Hopefully they will address this or at least get back to me. In the meantime I will see what I can do to remove these ghost buses.