Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"delay" not working #11

Closed
Brice187 opened this issue Dec 10, 2017 · 5 comments
Closed

"delay" not working #11

Brice187 opened this issue Dec 10, 2017 · 5 comments

Comments

@Brice187
Copy link
Contributor

Brice187 commented Dec 10, 2017

time: 0:55
arrival: 14:01
delay: 0
next_on: 13:29
ontime: false
icon: mdi:train
price: null
transfers: 1
products: RE,STR
friendly_name: Menden(Rheinl) to Bonn Gronau Olof-Palme-Allee
next: 13:29
departure: 13:06


As you can the the train is not ontime, but the delay is 0.
on the page www.bahn.de a delay of 20 minutes is shown.

@kennell
Copy link
Owner

kennell commented Dec 10, 2017

I assume something in the HTML code changed, breaking the parser. Are you able to provide a fix?

@Brice187
Copy link
Contributor Author

Brice187 commented Dec 10, 2017

<td class="time" style="min-width:150px;"><div class="floatRight" style="padding-right: 15px;"></div>13:06&nbsp;<span class="delay">13:26</span></span></td>


so you have to subtract the value of td class "time" and the value of span class "delay".
i will have a look at it

@Brice187
Copy link
Contributor Author

the above mentioned span class delay is only available if the current connection actually has a delay. Providing a fix is a little bit time consuming, because you have to wait for a delayed connection to test :(

@kennell
Copy link
Owner

kennell commented Dec 11, 2017

Unfortunately i don't have time to take a look at this right now, but im happy to take a pull request.

@kennell
Copy link
Owner

kennell commented Jan 7, 2018

Thanks to @JulianKahnert for looking into this and providing a fix. Released on PyPi as version 0.20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants