Comments (4)
@benoitdemaegdt explain the reasons here : #11 (comment)
For now, there is no solution using this library. If you have any idea/skill/time, you can submit a PR 😉 !
from trainline-python.
I feel that the best we have to do is to migrate to thetrainline.com new APIs.
from trainline-python.
I tried to log in, with my personnal trainline account on the old api (https://www.trainline.fr/api/v5_1/account/signin), and I fall on another Exception : "errors":{"email":["Nous n’avons pas trouvé de compte associé à l’adresse e-mail et au mot de passe indiqués."]}}. It seems that there is a new database of accounts linked to this api, or that I didn't see anything...
data_login = {"id":"1","email":"MYEMAIL","password":"MYPASSWORD", "facebook_id":None,"facebook_token": None,"google_code": None,"concur_auth_code": None,"concur_new_email": None,"concur_migration_type": None,"source": None,"correlation_key": None,"auth_token": None, "user_id": None}
post_data_login = json.dumps(data_login)
ret_login = c._post(url="https://www.trainline.fr/api/v5_1/account/signin", post_data=post_data_login)
EDIT:
Accounts' data come from "https://www.trainline.fr/business", it is free to create a business account.
I succeeded to connect before making a searching request, adding the authentication token sent back in the header's searching request. I post the solving code as soon as I fix an ultimate bug which prevent to have more than approximately 10 trains with this method.
from trainline-python.
This issue has been solved by #17. We should close it.
from trainline-python.
Related Issues (16)
- Does it work for international train stations / Thalys / Eurostar? HOT 1
- Comfort Class
- All requests are crashing HOT 13
- Add a way to search uk tickets too HOT 3
- I can't install trainline using pip3
- SNCF requires (young) card number
- All requests give 400 error HOT 4
- [suggestion] i wanted an option to specify a date
- UnicodeDecodeError HOT 3
- CAPCHA Error HOT 2
- 403 error systematically HOT 2
- Crash sur certaines dates HOT 4
- Tarif TGVmax non pris en compte HOT 11
- Duplicates in stations_mini.csv HOT 2
- Don't use mutable function parameters HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trainline-python.