Git Product home page Git Product logo

tgv_maximize's Introduction

tgv_maximize's People

Contributors

divulgacheur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

vsinic odannis

tgv_maximize's Issues

Get proposal to the nearest station when destination is outside of France

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.

Generalise beyond TGVMax

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 :)

.env file completion

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

Captcha problem

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 !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.