Open zwogorg opened 2 years ago
bahn.guru uses generate-db-shop-urls
to generate these links, so this library needs to be adapted to the latest bahn.de markup.
generate-db-shop-urls was just updated and should now support the latest bahn.de layout.
Not sure if it works in enough cases though, while testing it, I encountered several cases where it couldn't match a journey.
Problem still exists. Just tested the connection from Stuttgart Hbf to Heidelberg Hbf, no redirects worked for me. I had to manually search for the connection in the "Rieseauskunft".
@tech-nickel Can you provide a connection that it fails with? Ideally a few days or weeks from now, so that we have some time to debug this before it's affected by realtime changes.
@derhuerst bahn.guru still uses the old version of generate-db-shop-urls
, so all connections fail (meaning that providing an example probably won't help you 😄)
Any news on this? Would be great to have it working again.
Just checked, with an example connection, and generate-db-shop-urls@4.0.0
successfully generated a booking URL for it.
So I assume upgrading generate-db-shop-urls
solves the issue. I couldn't find it in this repo though.
I upgraded generate-db-shop-urls
in link.bahn.guru now. I tried some connections, seems to work, but feel free to test as well and let me know. Thanks @derhuerst for the work!
Seems to work for me as well. Thank you!
Also quickly tested it, most seem to work, though upon further testing this one doesnt seem to work (I searched for "Hannover Hbf → München Hbf", "max. 3 Umstiege" and selected the 24.12.2022, "22:36-06:04 Uhr" over "Göttingen" with "ICE, ME" for 44,90€). EDIT: Also tried "Hamburg Hbf → Berlin Hbf 30.12.2022" "23:33 to 05:35 Uhr" again ICE and ME, it is also broken(so there might be a problem with the MEs).
Maybe someone can have a look at this, but with most links working it's already a huge improvement, thx.
Thanks for the example, I remember that "private" trains always had some problems (like Metronom in this example), but maybe @derhuerst can look into that?
@Lamdarer Please report such issues in the generate-db-shop-urls
repo, so that I can keep track of them. Also, if possible, please include the following, so that I can try to pinpoint the problem even in hindsight, as often the data in the DB website changes:
v5.db.transport.rest
.I've made a PR on link.bahn.guru to use the new search to link to the search page with the first result being the connection (this isn't perfect but it's pretty great. I'd be open to also just using this as a fallback link it's now just the fallback link)
Hi! It seems that the links directing to the Deutsche Bahn website don't work anymore. I think they changed the booking website on the first of April and now deeplinks are dead/redirect to the booking portal.