xur17 / southwest-alerts

MIT License
67 stars 22 forks source link

BAD_REQUEST error #18

Open bass-windu opened 3 years ago

bass-windu commented 3 years ago

Thank you for this helpful tool. I attempted to run it but I received a bad request error as seen below when attempting to run in docker on a synology DS 918+.

{"code":400120102,"message":"","httpStatusCode":"BAD_REQUEST","requestId":"","infoList":[""]} Traceback (most recent call last): File "/app/southwestalerts/app.py", line 87, in check_for_price_drops(user.username, user.password, user.email) File "/app/southwestalerts/app.py", line 12, in check_for_price_drops southwest = Southwest(username, password) File "/app/southwestalerts/southwest.py", line 11, in init self._session = _SouthwestSession(username, password) File "/app/southwestalerts/southwest.py", line 68, in init self._login(username, password) File "/app/southwestalerts/southwest.py", line 73, in _login 'password': password File "/app/southwestalerts/southwest.py", line 84, in post return self._parsed_response(resp, success_codes=success_codes) File "/app/southwestalerts/southwest.py", line 101, in _parsed_response raise Exception('Invalid status code received. Expected {}. Received {}.'.format(success_codes, response.status_code)) Exception: Invalid status code received. Expected [200]. Received 400.

joshjohanning commented 3 years ago

I think Southwest changed the mobile API's in enough ways to put this project on life support.

I was messing around with this the other week, along with the API endpoints changing, it seems like there are several tokens needed in the login API header that rotate in a pattern that I couldn't define.

An example of some of the required headers can be found in this commit/repo: https://github.com/pedrovhb/southwest-alerts/commit/9d6fb2975ff8319e0032bcf2b86d693a98b0344a

Fffrank commented 3 years ago

I forked this and made it work. I don't really know what I'm doing so it's pretty hacked together but it is functional: https://github.com/Fffrank/southwest-alerts

hildebrau commented 9 months ago

@xur17 , did you fully abandon this project? Do you know of a working one out there?