hafas-client
hafas-client copied to clipboard
find replacement for defunct oebb endpoint
Hello there, I just want to report the error I am getting for oebb [1] journey API calls:
FetchError: request to http://fahrplan.oebb.at/bin/mgate.exe? failed, reason: connect ETIMEDOUT 195.69.194.134:80
I am using the version hafas-client version: 5.9.0. I am using it for months now without a problem, this is the first time I could observe this behavior.
Thanks in advance for any help.
1: https://github.com/public-transport/hafas-client/tree/master/p/oebb
Yes, it would be good to find one. Have you checked if the HAFAS-based ÖBB apps still work, and if, which endpoint they use?
This issue can be closed, it seems that the oebb service can't be reached from some IP addresses. I've tried from another network, and it is working just fine. Thank you for your support!
[...] the oebb service can't be reached from some IP addresses.
Le5‘s document that then!
Keep in mind that most HAFAS endpoints will drop/timeout connections from your IP address if you have sent too many requests in a short time frame. This happened to me several times with several endpoints.
if you have sent too many requests in a short time frame. This happened to me several times with several endpoints.
I think, that this is exactly what did happen to me.
Can you confirm this from a "fresh" IP address? Are you able to find a limit that we can document?
I ran into the same problem with the BVG rest API. Querying every hour from 10.00 on 08.12 to 13.00 on 09.12. and after that, only time outs. So I guess the limit for me was 26 + tests ~40 per ca.24h. Is that possible? I'll try to query again on Monday.
I ran into the same problem with the BVG rest API.
Which one?
Querying every hour from 10.00 on 08.12 to 13.00 on 09.12. and after that, only time outs. So I guess the limit for me was 26 + tests ~40 per ca.24h. Is that possible?
Although the company that runs these endpoints recently enabled stricter request rate limits, AFAIK they are not that low. As a test, I just ran 90 requests (hafas.departures('900000049151')
) in 10min and didn't get blocked/rate-limited.
I used the following bash command tp get the data:
curl -X 'GET' 'https://v5.vbb.transport.rest/stops/900000049151/arrivals?duration=10&linesOfStops=false&remarks=true&language=en' -H 'accept: application/json' | jq .
and get
request to https://bvg-apps-ext.hafas.de/bin/mgate.exe? failed, reason: connect ETIMEDOUT
when using v5.bvg
or
request to https://fahrinfo.vbb.de/bin/mgate.exe? failed, reason: connect ETIMEDOUT
when using v5.vbb
@FloMoTionGo Ah, this is unrelated. The IP address of the v5.{bvg,vbb}.transport.rest
server had been blocked by the respective upstream API. I have implemented a workaround, it should work again (for now). You can find more background info in https://github.com/derhuerst/vbb-rest/issues/29 & https://github.com/public-transport/transport.rest/issues/2. If you have more questions, please open a new Issue.
I'm going to hide the messages related to v5.{bvg,vbb}.transport.rest
, since this thread is about the upstream ÖBB API being unavailable.