SouthwestCheckin icon indicating copy to clipboard operation
SouthwestCheckin copied to clipboard

open

Open jedibig opened this issue 2 years ago • 2 comments

It seams like openflights does not allow api calls anymore, there is a timestamp in shareDetails entry when loading reservation that contains timestamp

Traceback (most recent call last):
  File "./checkin.py", line 101, in <module>
    auto_checkin(reservation_number, first_name, last_name, verbose)
  File "./checkin.py", line 66, in auto_checkin
    airport_tz = openflights.timezone_for_airport(leg['departureAirport']['code'])
  File "/usr/src/app/southwest/openflights.py", line 14, in timezone_for_airport
    airport_tz = pytz.timezone(json.loads(tzresult.text)['airports'][0]['tz_id'])
  File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

jedibig avatar Oct 04 '22 03:10 jedibig

Yes it seems like they put some sort of request wall up

I ended up switching to the Flightaware AeroAPI as a replacement

h4xdaplanet avatar Oct 04 '22 04:10 h4xdaplanet

Yes it seems like they put some sort of request wall up

I ended up switching to the Flightaware AeroAPI as a replacement

Do you have a working version with this replacement?

zach-portnoff avatar Oct 06 '22 15:10 zach-portnoff