Open hoopsbwc34 opened 3 years ago
Here's what I did to fix the problem above, let me know if you want a PR:
temp = self._session.get(url)
# check if there is a greyboxmessage warning for companion or other issue
if not (temp['viewReservationViewPage']['greyBoxMessage'] is None):
return None
url = '/api/mobile-air-booking/v1/mobile-air-booking/page/flights/cancel-bound/{record_locator}?passenger-search-token={token}'.format(
record_locator=record_locator,
token=temp['viewReservationViewPage']['_links']['cancelBound']['query']['passenger-search-token']
)
And the corresponding continue to the for loop in app.py:
# try:
cancellation_details = southwest.get_cancellation_details(record_locator, passenger['first-name'], passenger['last-name'])
if cancellation_details is None:
continue
I don't currently have a companion so haven't been able to test, but would love if you could try to push this fix! Thanks!
I'll have to cherry pick cause I've got a lot of differences in my code (using Twilio for SMS notifications and config.ini instead of system variables for my southwest login info) so it may take me a bit, but I'll create a pull request here soon!
I don't think this is related directly to the companion pass. I get the same error for a non-companion pass flight.
Hoopsbwc34, i'd love to see your changes and integration for Twilio thou!
When you have a companion ticket linked to the ticket, you aren't able to change the flight (southwest posts a message that says a companion ticket is linked and you must cancel that ticket first). This causes the script to fail on line 69 of southwest.py:
It would be nice if the script continued on to the next confirmation code instead of dying as I have other reservations in the future that I'd like to check.