Go Back  FlyerTalk Forums > Travel&Dining > Travel Tools
Reload this Page >

Flightplan: How to search a year of award inventory [no longer maintained]

Community
Wiki Posts
Search
Old Jan 16, 2019, 4:04 pm
FlyerTalk Forums Expert How-Tos and Guides
Last edit by: IBobi
Print Wikipost

Flightplan: How to search a year of award inventory [no longer maintained]

Thread Tools
 
Search this Thread
 
Old Jul 10, 2018, 11:35 pm
  #46  
Original Poster
 
Join Date: Jan 2010
Posts: 189
Originally Posted by rickywk
I tried install it in another Windows machine, seems the installation path and /bin command path is different than my original one.
I also did tried moved entire flightplan folder to another one, but the command cannot works
Originally Posted by rickywk
Did OP accepts donate, it's a great tools to let us more deep thinking on awards seats
Originally Posted by rickywk
Is it possible to search QF/BA site, so we can deep analyst how much seats did CX released for partners
Yeah, I will like to add those next, though I need to add support for storing and querying partner award availability. It complicates the UI a little, because now you can see say, CX awards from 3 different sources (so I probably need a way to indicate and filter on that). I'll mull it over
jd20 is offline  
Old Jul 10, 2018, 11:47 pm
  #47  
Original Poster
 
Join Date: Jan 2010
Posts: 189
Originally Posted by steven1201
My port is 5000, but localhost:5000 doesn't work.
When you run "flightplan server" it runs the back-end server that runs on port 5000 and returns raw data from the database. When you run "flightplan client" it runs the website that you connect to on port 3000. To view the website, you need both running (because client talks to server, it can't read the database directly itself), and you point your web browser to http://localhost:3000.

Originally Posted by steven1201
I just tried what you mentioned and my chrome just showed a blank page with a line "Cannot GET /".
What's the command line output when you run the client and server commands? Any errors? Make sure your web browser is pointing to localhost:3000, not localhost:5000.

Originally Posted by steven1201
Excellent tools!! I am able to run search however not able to launch the Web UI.

After I input the command "flightplan client", it responds that "C:\\Users\\Steven" doesn't exist.

My user account in windows is "Steven XXXX", guess it was truncated in the script? Do you know how I can fix it? Thanks!
This was a bug in the client command, I fixed and pushed a new version. For any who ran into this issue, run "yarn global upgrade" to get the latest version.
jd20 is offline  
Old Jul 10, 2018, 11:56 pm
  #48  
Original Poster
 
Join Date: Jan 2010
Posts: 189
Originally Posted by blahter
There's 2 big hurdles to get over with extensions:
  1. The javascript you can inject is run in a separate context than the page's own js context
  2. Changing the value on a textbox via jquery/pure js for example doesn't trigger the React onChange event which in turn won't call the function to set the value of the departure airport(QF). Chrome headless may actually simulate a user performing the action so you may not run into this issue.
That's interesting, yeah, seems like issue #1 could complicate things. Your extension still sees the DOM as it is changed by the page's JS tho, right? So for React / Angular apps, you would "see" what the user sees?

Yeah, one nice thing with Puppeteer is you can mimic user actions like typing and clicking. You can even insert random delays between key strokes, making it look very human. But it's simpler and more robust to set value directly, when possible. I sometimes have issues with typing in boxes, because a modal pop-up will interrupt the action. Or calendar, trying to page through month by month, and find the right day to click is fare more code than just setting form value directly.
jd20 is offline  
Old Jul 11, 2018, 12:43 am
  #49  
 
Join Date: Jul 2018
Posts: 6
Every time when I start a new search, the first search will be timed out and that search date will be skipped. Maybe a logout step can be added before the previous search was completed?

Last edited by steven1201; Jul 11, 2018 at 1:00 am Reason: typo
steven1201 is offline  
Old Jul 11, 2018, 1:16 am
  #50  
Original Poster
 
Join Date: Jan 2010
Posts: 189
Which airline are you seeing that with? I think I was seeing a similar thing, but not all the time, it was sporadic (and depended on whether the browser was in headless mode or not). I'll try and repro it further.

The reason I don't do a fresh login on every session, is it can look suspicious to the airline (since normal browsers retain cookies between sessions). Normal human users don't get timeouts on first search in normal Chrome, so I'm sure it's a bug somewhere.
jd20 is offline  
Old Jul 11, 2018, 1:33 am
  #51  
 
Join Date: Jul 2018
Posts: 6
Originally Posted by jd20
Which airline are you seeing that with? I think I was seeing a similar thing, but not all the time, it was sporadic (and depended on whether the browser was in headless mode or not). I'll try and repro it further.

The reason I don't do a fresh login on every session, is it can look suspicious to the airline (since normal browsers retain cookies between sessions). Normal human users don't get timeouts on first search in normal Chrome, so I'm sure it's a bug somewhere.
CX - Asiamiles

Say I search from A to B between 2019-03-16 and 2019-03-20, then I start a new search from C to D between 2019-03-16 and 2019-03-20. The first search of C to D on 2019-03-16 will be skipped due to timeout.

I think it makes sense to logout after finishing all the search from A to B.
steven1201 is offline  
Old Jul 11, 2018, 1:35 am
  #52  
Original Poster
 
Join Date: Jan 2010
Posts: 189
Let me take a look tomorrow. In meantime, you can delete cookies from the database to simulate a logout, or just run the search again should work too.
steven1201 likes this.
jd20 is offline  
Old Jul 11, 2018, 8:24 am
  #53  
 
Join Date: Jan 2018
Programs: JMB Sapphire, OneWorld Sapphire
Posts: 114
sorry for the noob question. will i be able to run chromium on the background? it keeps on popping up every now and then while the search is ongoing.
abielp is offline  
Old Jul 11, 2018, 11:23 am
  #54  
Original Poster
 
Join Date: Jan 2010
Posts: 189
Yes! If you run "flightplan help search", you'll see:

-h, --headless Run Chrome in headless mode

So, just add -h to the command, and it will run in the background.
jd20 is offline  
Old Jul 11, 2018, 11:37 am
  #55  
 
Join Date: Jul 2018
Posts: 3
Would it be able to run few search at the same time ?
kppklam is offline  
Old Jul 11, 2018, 12:01 pm
  #56  
Original Poster
 
Join Date: Jan 2010
Posts: 189
Yes, you can run as many instances of flightplan on the same machine as you like (each one has it's own instance of Chromium running) but there's a few caveats:
  • Some airlines (like SQ) do weird things with session management, such that if you try to search from the same account logged onto multiple computers, they will interfere with each other.
  • Also some airlines (again, mainly SQ) monitor how many requests come from same IP, and will start blocking that IP address. So, running multiple instances from same computer, you're gonna hit that limit sooner.
Because of this, my recommendation is: you can run multiple instances, but make sure they're searching different websites.
jd20 is offline  
Old Jul 11, 2018, 12:37 pm
  #57  
 
Join Date: Jul 2018
Posts: 3
With CX, if I run more than one search. It won't work. I think it only works for different websites. Thanks
kppklam is offline  
Old Jul 11, 2018, 7:41 pm
  #58  
 
Join Date: Oct 2013
Posts: 289
CX: You can perform search twice at same time, but it only works with two PC.
-h variable: I feels that this method is faster than verbose mode.
rickywk is offline  
Old Jul 11, 2018, 7:49 pm
  #59  
Original Poster
 
Join Date: Jan 2010
Posts: 189
When running multiple instances of flightplan, each instance gets it own complete copy of Chromium (there's nothing being shared between them, other than your IP address). So if CX is working on multiple computers (with same account) it should work on same computer too, unless CX is doing something tricky with monitoring IP addresses. To be safe, I'd use multiple CX accounts if running on same computer (there's a command line option to specify which account to use from accounts.json).

-h shouldn't be really any faster than non-headless mode... Most of the delay is waiting for the airline website to respond (I've seen SQ regularly take about a minute to return award results) and the throttling delay which is inserted between requests (usually like 10-20 seconds).
jd20 is offline  
Old Jul 11, 2018, 9:07 pm
  #60  
 
Join Date: Jul 2018
Posts: 3
everything is ok now with 2 different accounts. Thanks a lot !
kppklam is offline  


Contact Us - Manage Preferences - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

This site is owned, operated, and maintained by MH Sub I, LLC dba Internet Brands. Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Designated trademarks are the property of their respective owners.