Giter VIP home page Giter VIP logo

Comments (16)

polastre avatar polastre commented on August 21, 2024 1

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.

polastre avatar polastre commented on August 21, 2024 1

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.

polastre avatar polastre commented on August 21, 2024

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.

cedricyau avatar cedricyau commented on August 21, 2024

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.

ctkelley avatar ctkelley commented on August 21, 2024

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.

polastre avatar polastre commented on August 21, 2024

from united.

ctkelley avatar ctkelley commented on August 21, 2024

from united.

polastre avatar polastre commented on August 21, 2024

@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.

polastre avatar polastre commented on August 21, 2024

You will need at least Node 7, likely Node 8.

from united.

ctkelley avatar ctkelley commented on August 21, 2024

from united.

polastre avatar polastre commented on August 21, 2024

from united.

cedricyau avatar cedricyau commented on August 21, 2024

Clever! I figured (Headless) Chrome might be needed but I wasn't sure how to do that in NodeJS.

from united.

ctkelley avatar ctkelley commented on August 21, 2024

from united.

ctkelley avatar ctkelley commented on August 21, 2024

from united.

ctkelley avatar ctkelley commented on August 21, 2024

from united.

kirtan avatar kirtan commented on August 21, 2024

@polastre just tried puppeteer branch and it worked well for a simple request, but still getting TIMEOUT! error sometimes.

from united.

Related Issues (17)

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.