schiene icon indicating copy to clipboard operation
schiene copied to clipboard

Help with use

Open OldShaterhan opened this issue 1 year ago • 1 comments

Hi, I've got small question - I want to use this integration with HomeAssistant, but I have problems using it in Polish connections (Polish trains are visible on bahn.de).

I want to query for i.e. such connection: https://reiseauskunft.bahn.de/bin/query.exe/dn?ld=43166&protocol=https:&seqnr=1&ident=i3.012020166.1659559405&rt=1&OK#hfsseq2|i3.012020166.1659559405 (starting point is Mysłowice and target is Katowice) and it works for "Myslowice"

I try to use it for "Mikołów" (Mikolow) and then there's no results at all, although there should be some:

https://reiseauskunft.bahn.de/bin/query.exe/dn?start=1&existOptimizePrice-deactivated=1&REQ0JourneyStopsS0A=1&S=Mikolow&REQ0JourneyStopsSID=A%3D1%40O%3DMikolow%40X%3D18899407%40Y%3D50172959%40U%3D80%40L%3D005102244%40B%3D1%40p%3D1659382252%40&REQ0JourneyStopsZ0A=1&Z=Katowice&REQ0JourneyStopsZID=A%3D1%40O%3DKatowice%40X%3D19017165%40Y%3D50257512%40U%3D80%40L%3D005100020%40B%3D1%40p%3D1659382252%40&date=Mi.%2C+03.08.2022&time=22%3A48&timesel=depart&returnDate=&returnTime=&optimize=0&auskunft_travelers_number=1&tariffTravellerType.1=E&tariffTravellerReductionClass.1=0&tariffClass=2&externRequest=yes&HWAI=JS%21js%3Dyes%21ajax%3Dyes%21#hfsseq1|kd.027210166.1659559734

I'm able to get data from:

import schiene
s = schiene.Schiene()
s.stations('Mikolow')

but not for

s.connections('Mikolow', 'Katowice')

Thanks for any help!

OldShaterhan avatar Aug 03 '22 20:08 OldShaterhan

I can confirm that

s.connections('Myslowice', 'Katowice')

works, but

s.connections('Mikolow', 'Katowice')

does not.

I'll look into it in the next few days, but can't promise any results here.

kennell avatar Aug 03 '22 21:08 kennell