Comments (16)
If you want to try a new approach, check out the puppeteer
branch that is a work in progress. It will be much slower, and likely less reliable, but at least is working most of the time at the moment.
You'll need to run node united2.js
instead of united.js
. Be sure to run npm install
before trying to run it.
Let me know what kind of problems you run into, please post in this issue.
Proposed changes: https://github.com/polastre/united/tree/puppeteer
from united.
I've merged puppeteer
branch into master and created a new release.
I've parallelized the requests, so it is much faster. Increased the timeout for people on slower connections.
Feel free to open new issues regarding the new approach.
from united.
It isn't surprising. It is a bit of a cat and mouse game.
It wouldn't be hard to ping their site, get a cookie, and insert it into the headers for the request here: https://github.com/polastre/united/blob/master/united.js#L95
Feel free to submit a PR/patch.
from united.
It appears to be a little more involved than a basic access cookie. Seems that the cookies are tied to the individual request parameters and represent a hash. The second half of the _abck cookie in particular changes based on the request parameters (eg origin, destination, travel date). Attribute-Based Canetti-Krawczyk appears to be what that represents.
from united.
npm install failed for me
I've attached the log file. I tried both versions with the same results
2017-11-27T10_18_22_541Z-debug.log
2017-11-27T10_18_22_541Z-debug.log
from united.
from united.
from united.
@ctkelley Download the latest node. Here's what your log says:
0 info it worked if it ends with ok
1 warn npm npm does not support Node.js v5.0.0
2 warn npm You should probably upgrade to a newer version of node as we
3 warn npm can't make any promises that npm will work with this version.
4 warn npm Supported releases of Node.js are the latest release of 4, 6, 7, 8.
5 warn npm You can find the latest version at https://nodejs.org/
Please follow the instructions
from united.
You will need at least Node 7, likely Node 8.
from united.
from united.
from united.
Clever! I figured (Headless) Chrome might be needed but I wasn't sure how to do that in NodeJS.
from united.
from united.
from united.
from united.
@polastre just tried puppeteer branch and it worked well for a simple request, but still getting TIMEOUT! error sometimes.
from united.
Related Issues (17)
- Error after first iteration HOT 1
- "Cannot read property 'Trips'..." HOT 1
- [MS WINDOWS] Unable to run using newest version HOT 2
- Error: Cannot find module "puppeteer" HOT 2
- Can code be modified for Global Services Members? HOT 1
- how do I make a search and get the ticket price in points HOT 1
- Dockerize application for more availability
- Can't edit search parameters HOT 2
- seems not to work properly anymore HOT 3
- [Feature Request] Filter Upgrade Type Premium Economy / Business HOT 1
- New united.com flight search breaks united.js
- Still working?
- Only one date is returned HOT 3
- False Positives
- Problems on high Sierra HOT 5
- Access denied HOT 1
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 united.