flightplan-tool / flightplan

Search for award inventory using Node.js and Headless Chrome!
Apache License 2.0
142 stars 41 forks source link

NH Search failing #13

Closed ferni7 closed 5 years ago

ferni7 commented 5 years ago

SYD-BKK 6th Feb there are F seats (Manually searched NH) but FP is getting an error (searched whole Feb and same error) This is the error FP is getting:

image

jd20 commented 5 years ago

The behavior looks correct to me. Tried the following command:

flightplan search -w NH -f SYD -t BKK -c first -s 2019-02-06 --force

Because it needs to get availability in both directions for Feb 6, it's running two searches: SYD-BKK, and BKK-SYD. The SYD-BKK search returns no awards, the BKK-SYD search has one award (TG476 / TG475). I get the same result whether I run it from browser or flightplan. Also, the screenshot you attached is for 2/11, though it looks the same as what I get for 2/6 (in the SYD-BKK direction).

ferni7 commented 5 years ago

Thanks. I was using -p since this was a partner - guess that's not needed for NH?

I can't get the NH site to work with 2pax, but using KVSTOOL it was showing 2 pax... hmmm

[KVS Tool 9.0.1/Diamond - Awards/NH-StarAlliance/JP]

SYD Sydney Kingsford Smith NS AU [YSSY] BKK Bangkok Metro / Suvarnabhumi Intl TH = BKK DMK [VTBS] WED 06 Feb 2019 | 2 Seats

Carrier Flight From Depart To Arrive A/C St Award Availability


TG 476 SYD 10:00 BKK 15:25 747 FS+ YS+

jd20 commented 5 years ago

Right, -p not necessary with NH, it always returns partner results.

I mixed up the routes in my above comment, when I ran flightplan for 2/6 I got the TG 476 award for SYD-BKK (same as KVS is reporting) and no award for BKK-SYD. So, that seems consistent with KVS.

However, I will say I did a bit more digging, and one issue I found is that NH hides the outbound award, if no return award is available. When searching NH for availability in one direction, flightplan creates a dummy return segment (+3 days), since technically NH won't let you search for one-way awards. If that return award is on a date with no availability though, we think there's no availability for either segment (outbound or inbound).

Longer term (i.e. the next couple of weeks) I'll probably migrate NH engine to use their multi-city search. That provides availability for partners, all cabins, and doesn't exhibit the problem I mention above, which could be causing flightplan to not see some awards (though 2/6 for the route you mention doesn't seem affected, but I saw other dates that could be).

jd20 commented 5 years ago

Filed: #16

ferni7 commented 5 years ago

Awesome, think that matches what I saw :) Thank you!