Skip to content

Conversation

@DavidWittman
Copy link
Owner

@DavidWittman DavidWittman commented Jan 2, 2022

These changes add a new function, sw-update-headers, which runs a
headless Chrome browser to scrape the required Authentication headers
for checking in and stores them in Parameter Store. The check-in lambda
then pulls these headers from the Parameter Store on invocation and uses
them to (hopefully) check in successfully.

Right now the sw-update-headers lambda is triggered every hour, but it
could be improved to run on check-in failures or something.

I had to fight a lot with the correct Python/Selenium/Chromium
versions on Lambda. This exact combination of Python 3.6 and the
Chromedriver was the only one I could get to work. So we're stuck on 3.6
until this is resolved.

Based on the work in https://github.com/byalextran/southwest-checkin

Closes #83

These changes add a new function, sw-update-headers, which runs a
headless Chrome browser to scrape the required Authentication headers
for checking in and stores them in Parameter Store. The check-in lambda
then pulls these headers from the Parameter Store on invocation and uses
them to (hopefully) check in successfully.

Right now the sw-update-headers lambda is triggered every hour, but it
could be improved to run on check-in failures or something.

I had to fight a _lot_ with the correct Python/Selenium/Chromium
versions on Lambda. This exact combination of Python 3.6 and the
Chromedriver was the only one I could get to work. So we're stuck on 3.6
until this is resolved.
 - Add the update headers function to the state machine when checkins
fail. There's a potential for an endless loop here but I'll keep that in
mind for later.
- Fix hard-coded uid in Makefile
- Reduce memory size for update headers fn
- Move state machine JSON to a template file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API Authentication Errors: 429 Rate Limiting Error & 403 Forbidden

2 participants