divulgacheur / tgv_maximize Goto Github PK
View Code? Open in Web Editor NEWCLI client to show all available proposals for MAXJeunes (ex TGVMax) subscribers
CLI client to show all available proposals for MAXJeunes (ex TGVMax) subscribers
In this example, the TGV_Maximize tool cannot find direct proposal because destination isn't in France.
./main.py Montpellier Bruxelles -q -t 1
mer. 15 déc. 2021 00:00:03
Direct journey from Montpellier to Bruxelles Midi (gare principale) (Belgique)
Let's try to split the journey from Montpellier to Bruxelles : 24 intermediate stations available
$ ./main.py Montpellier Lille -q -t 1
mer. 15 déc. 2021 00:00:50
Direct journey from Montpellier to Lille (toutes gares)
montpellier sud de france (09:10) → lille europe (14:24) TGV INOUI 5062 more than 10 seats remaining
montpellier saint-roch (14:52) → lille europe (19:56) TGV 9864 more than 10 seats remaining
montpellier sud de france (17:10) → lille europe (21:59) TGV INOUI 5182 more than 10 seats remaining
Let's try to split the journey from Montpellier to Lille : 22 intermediate stations available
In the case the departure/arrival station is not located in France (see is_in_france()
), use the closest station located in France to compute the proposals.
First of all, thanks a lot @divulgacheur for your work. While testing the code, I noticed that Appconfig's class method "update_cookies_from_dict" is missing.
Will it be fixed soon?
Taha
Thanks for writing this!
Can it be generalised beyond the TGVMax-specific prices?
If so, how should the code be modified in order to do that?
Thanks :)
Hi everyone,
The program was running just fine when I tried in the beginning of the year with oui.sncf, but now with sncf-connect.com, I have a problem with the field SNCFCONNECT_COOKIE= in the .env file.
With this new website, the cookie starts with : x-correlationid=20 ....., did you get the same thing or am I mistaken ?
Thank you,
Have a nice day,
Guillaume
Hi,
I managed to use your repo by copy-pasting the headers cookies in the request POST | https://www.sncf-connect.com/bff/api/v1/itineraries
done on my computer in your code. But after some hours, I got an error :
Error: HTTP 403 {"url":"https://geo.captcha-delivery.com/captcha/?initialCid=AHrlqAAAAAMA4SU4xHL3M6IAbdB8CQ==&cid=yR-MpBRv7DNMoV424fC5MylpV5UCBYP8D~h10sDbiYeLH-XLXwoXSnwbgg6UdGe4J-NoQUUN79cntmGMZ5BD~LzwZWlIh0QmwQcZ9NuHxQUqVSPqL72gVg44q9Z9FOz&referer=http%3A%2F%2Fwww.sncf-connect.com%2Fbff%2Fapi%2Fv1%2Fitineraries&hash=746B7C2640FFCBD6D2BEC599D9FB5F&t=fe&s=36834&e=b41a4e3ebfd4c3baee6fdb408b55a0d862337d80bf3864c5713befeda1952730"}
Did you find a solution ?
I thought about using a captcha solver in a selenium browser and copy-pasting the new cookies.
By the way, thank you a lot for your nice repo !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.