-
Notifications
You must be signed in to change notification settings - Fork 9
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
doesn't work #33
doesn't work #33
Comments
Hey, the API this repo uses seems to be unavailable since 2-3 days. I'm currently looking for a workaround, but that might take a few days/weeks. Will update this repo once I found a replacement. |
Hey, i have the same issue. Is there tentative timeframe when this will be solved? |
do you have any news ? |
I had a look at the network traffic. App The app displays the following connections and their prices: Request In order to obtain the prices, the app does the following request:
as curl: curl -X $'POST' \
-H $'User-Agent: Dalvik/2.1.0 (Linux; U; Android 9; unknown Build/PI)' \
-H $'Content-Type: application/json;charset=UTF-8' \
-H $'Host: reiseauskunft.bahn.de' \
-H $'Accept-Encoding: deflate' \
--data-binary $'{\"auth\":{\"aid\":\"n91dB8Z77MLdoR0K\",\"type\":\"AID\"},\"client\":{\"id\":\"DB\",\"name\":\"DB Navigator\",\"os\":\"Android 9\",\"res\":\"1080x2028\",\"type\":\"AND\",\"ua\":\"Dalvik/2.1.0 (Linux; U; Android 9; unknown Build/PI)\",\"v\":22080000},\"ext\":\"DB.R22.04.a\",\"formatted\":false,\"lang\":\"eng\",\"svcReqL\":[{\"cfg\":{\"polyEnc\":\"GPA\"},\"meth\":\"Reconstruction\",\"req\":{\"getPasslist\":true,\"getPolyline\":true,\"outReconL\":[{\"ctx\":\"T$A=1@O=Frankfurt(Main)Hbf@L=8000105@a=128@$A=1@O=K\xc3\xb6ln Hbf@L=8000207@a=128@$202305251828$202305251931$ICE 10$$1$$$$$$\"}],\"trfReq\":{\"cType\":\"PK\",\"directESuiteCall\":true,\"jnyCl\":2,\"rType\":\"DB-PE\",\"tvlrProf\":[{\"type\":\"E\"}]}}}],\"ver\":\"1.15\"}' \
$'https://reiseauskunft.bahn.de/bin/mgate.exe?checksum=bac6e939533c25bb9d19781735fb165d' Response This is the reponse (I removed some parts in order to make it easier to crasp the relevant section):
So the price is located at |
I updated my previous comment in order to provide the curl command for the request, the response and a screenshot of the app |
The problem is that this request
|
With respect to your first comment, the best price option triggers the following request: curl -X $'POST' \
-H $'User-Agent: Dalvik/2.1.0 (Linux; U; Android 9; Pixel 3 Build/PI)' \
-H $'Content-Type: application/json;charset=UTF-8' \
-H $'Host: reiseauskunft.bahn.de' \
-H $'Accept-Encoding: deflate' \
--data-binary $'{\"auth\":{\"aid\":\"n91dB8Z77MLdoR0K\",\"type\":\"AID\"},\"client\":{\"id\":\"DB\",\"name\":\"DB Navigator\",\"os\":\"Android 9\",\"res\":\"1080x2028\",\"type\":\"AND\",\"ua\":\"Dalvik/2.1.0 (Linux; U; Android 9; Pixel 3 Build/PI)\",\"v\":22080000},\"ext\":\"DB.R22.04.a\",\"formatted\":false,\"lang\":\"eng\",\"svcReqL\":[{\"cfg\":{\"polyEnc\":\"GPA\",\"rtMode\":\"HYBRID\"},\"meth\":\"BestPriceSearch\",\"req\":{\"outDate\":\"20230525\",\"outTime\":\"183000\",\"arrLocL\":[{\"crd\":{\"x\":6959197,\"y\":50942823},\"extId\":\"8000207\",\"lid\":\"A=1@O=K\xc3\xb6ln Hbf@X=6958730@Y=50943029@U=80@L=8000207@B=1@p=1678909069@\",\"name\":\"K\xc3\xb6ln Hbf\",\"type\":\"S\"}],\"depLocL\":[{\"crd\":{\"x\":8663003,\"y\":50106817},\"extId\":\"8000105\",\"lid\":\"A=1@O=Frankfurt(Main)Hbf@X=8663785@Y=50107149@U=80@L=8000105@B=1@p=1678909069@\",\"name\":\"Frankfurt(Main)Hbf\",\"type\":\"S\"}],\"getPasslist\":true,\"getPolyline\":true,\"jnyFltrL\":[{\"mode\":\"BIT\",\"type\":\"PROD\",\"value\":\"11111111111111\"}],\"trfReq\":{\"cType\":\"PK\",\"jnyCl\":2,\"tvlrProf\":[{\"type\":\"E\"}]}}}],\"ver\":\"1.15\"}' \
$'https://reiseauskunft.bahn.de/bin/mgate.exe?checksum=b7fbc668cec93b4a6d3a24a12d9339cc' The output is quite large, I will try to prepare a suitable snippet if I have more time. |
App Response My first guess, the {
"ver": "1.15",
"ext": "DB.R22.04.a",
"lang": "eng",
"id": "namwkn2u2wcwggwg",
"cInfo": ...,
"svcResL": [
{
"meth": "BestPriceSearch",
"err": "OK",
"res": {
"common": ...,
"outConL": [
{
"cid": "A0-0",
"date": "20230525",
"dur": "023500",
"chg": 0,
"dep": ...,
"arr": ...,
"secL": ...,
"ctxRecon": "T$A=1@O=Frankfurt(Main)Hbf@L=8000105@a=0@$A=1@O=Köln Hbf@L=8000207@a=0@$202305250322$202305250557$IC 60402$$1$$$$$$",
"trfRes": {
"statusCode": "OK",
"fareSetL": [
{
"fareL": [
{
"prc": 1790,
"isFromPrice": true,
"isPartPrice": false,
"isBookable": true,
"isUpsell": false,
"targetCtx": "D",
"buttonText": "To offer selection",
"retPriceIsCompletePrice": false,
"retPrice": -1,
"fahrrad": false
}
]
}
]
},
"conSubscr": "U",
"resState": "N",
"resRecommendation": "N",
"recState": "U",
"sotRating": 0,
"isSotCon": false,
"showARSLink": false,
"cksum": "cf66b09d_3",
"dTrnCmpSX": ...
},
...A0-X - A5-Y...
],
"fpB": "20221211",
"fpE": "20231209",
"bfATS": -1,
"bfIOSTS": -1,
"planrtTS": "1683557525",
"outDaySegL": ...,
"outTbpState": 0
}
}
]
} |
Correct.
While the // outDaySegL
[
{
"conRefL": [
4,
1,
2,
3,
0
],
"id": "0",
"fromDate": "20230509",
"fromTime": "000000",
"toDate": "20230509",
"toTime": "070000",
"bestPrice": {
"amount": 9590
},
"segmentHeightIndicator": 76,
"isCompletePrice": false,
"tbpState": 0
},
// …
] |
What is the way forward here? can we help somehow? What can we do to get a working client again? |
Given that it seems like the old standalone "Bestpreissuche" API doesn't exist/work anymore, I think it would be best to at least implement the current functionality of the DB Navigator (finding the best prices for one day). This should be done in Once the new intra-day "Bestpreissuche" API is implemented in |
Are there any updates on this? |
I used the bestPrice api in the hafas-client branch with success in https://github.com/thigg/fahrpreis-plotter. Seems to work without problems. |
@thigg I did not find a bestPrices Funciton in https://github.com/public-transport/hafas-client. I also checked every available branch and not one createClient-Function does have a bestPrices Function. Can you help me with that? |
I forked this branch on a fork: https://github.com/thigg/hafas-client/tree/add-BestPriceSearch
Am Mittwoch, 20. März 2024 schrieb zaunerp:
… @thigg I did not find a bestPrices Funciton in [https://github.com/public-transport/hafas-client](url). I also checked every available branch and not one createClient-Funktion does have a bestPrices Function. Can you help me with that?
--
Reply to this email directly or view it on GitHub:
#33 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***
|
Hello,
I tried but it doesn't work, is this normal? I see that the repo is from 2019
The text was updated successfully, but these errors were encountered: