Skip to content

Cannot get departue times with delays using get_timetable_changes() method #3

@illesbalog

Description

@illesbalog

Hi, when i try to get the current departure times using the get_timetable_changes() method i just get the departure times without the current delays and stuff. Why is that?

from deutsche_bahn_api.api_authentication import ApiAuthentication
from deutsche_bahn_api.station_helper import StationHelper
from deutsche_bahn_api.timetable_helper import TimetableHelper

api = ApiAuthentication("client id", "API Key")
success: bool = api.test_credentials()

station_helper = StationHelper()
station_helper.load_stations()
found_stations_by_name = station_helper.find_stations_by_name("Train_station_Name")

station = found_stations_by_name[0]
timetable_helper = TimetableHelper(station, api)
connections = timetable_helper.get_timetable()

trains_with_changes = timetable_helper.get_timetable_changes(connections)

for train in trains_with_changes:
    print("Train Number:", train.train_number)
    print("Train Type:", train.train_type)
    print("Platform:", train.platform)
    print("Departure:", train.departure)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions