xur17 / southwest-alerts

MIT License
67 stars 22 forks source link

429 error despite using throttle #17

Open KevinLinghu opened 4 years ago

KevinLinghu commented 4 years ago

I constantly got the following 429 error while executing this line:

                        available = southwest.get_available_flights_dollars(
                            departure_date,
                            origin_airport,
                            destination_airport
                        )

Error:

{
    "code": 429999999,

    "message": "Error.",

    "messageKey": "ERROR",

    "httpStatusCode": "BAD_REQUEST",

    "requestId": "",

    "infoList": []

}

Even with 30s throttle this still happen to every single query, so I'm thinking maybe it's caused by incorrect header, rather than too frequent calls?

KevinLinghu commented 4 years ago

@Fffrank not sure if you got this error now. It happens to every single query so it's not caused by sold-out flights.

Fffrank commented 4 years ago

@KevinLinghu I haven't found the magic required to fix it. I've made progress but at some point the 429 errors always come back. I'm not a skilled enough hack to figure it out (and don't have any other flights booked at this point so it's hard to troubleshoot.)