FlyerTalk Forums - View Single Post - Amtrak removes real time seat availability information
Old Dec 24, 2023 | 11:00 am
  #10  
serpens
 
Join Date: Sep 2015
Location: flyover country
Posts: 2,847
Many thanks.
Originally Posted by boswash52
[...]
You can find the session storage in your browser's developer tools. In Firefox, that's Tools > Browser Tools > Web Developer Tools and then select the Storage tab and then Session Storage on the left. [...]
I never would have found that. Perhaps this gives you an idea of my level of (non-)expertise--but I'm trying to learn.
Originally Posted by boswash52
[...]
Of course searchResults only shows up after you have done a search. You can also narrow down the output by pasting a one-line program into the Console part of the developer tools, e.g.:

Code:
console.log(JSON.stringify(JSON.parse(sessionStorage.searchresults).journeySolutionOption.journeyLegs.map(j=>j.journeyLegOptions.map(o => o.seatCapacityInfo.seatCapacityTravelClasses)),0," "))
(Sorry you have to scroll, I don't know how to make it wider without breaking the formatting and still keep it one line.)
[...]
Thank you for the shortcut, and horizontal scrolling does seem to be the lesser evil here.

As I experiment, will I be able to break anything that would cause a problem after quitting and restarting Firefox? In other words, should I not try this at home?
Originally Posted by boswash52
[...]
Err…what? Do you have an example where availableInventory is larger than criticalCapacity, other than when the latter is zero?
[...]
No, criticalCapacity is zero. I only saw it in your earlier example but skipped over or forgot your comment about it possibly being zero.

Thanks again. Now, armed with a little knowledge, can I be dangerous?
serpens is offline