Project

autoluv

0.05
The project is in a healthy, maintained state
Easy-to-use gem to check in to Southwest flights automatically. Also supports sending email notifications.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.7.6
~> 1.4.1
~> 2.3.1
~> 1.4.2
~> 1.13.1
~> 2.1.0
~> 2.0.2
 Project Readme

Southwest Checkin

Automatically check in to Southwest flights using this easy-to-use gem. It'll also email you the results so you know ASAP whether a check in was successful. Seconds count when you're fighting for that window or aisle seat!

⚠️ February 2023 Update ⚠️

It appears southwest-headers using the latest versions of Chrome (110) and undetected-chromedriver (3.4.6) produces an invalid header file. Read this thread for a workaround.

Requirements

  • A *nix-based server that will be on when you need to check in
  • Ruby 2.3 or higher
  • The at command

Tested and working on an Ubuntu 20.04 server (hosted by DigitalOcean).

Installation

Get Southwest Headers

The Southwest API now requires some randomly generated headers to check in. Because these headers change at a set interval, they need to be constantly refreshed for any check-in script (like this one) to work. To get these headers, please follow the instructions here:

https://github.com/byalextran/southwest-headers

Once a cron job has been scheduled, do these steps:

Step 1: Create the file .autoluv.env in your user's home directory.

nano ~/.autoluv.env

Step 2: Copy/paste the following into the text editor.

LUV_HEADERS_FILE  = /PATH/TO/southwest_headers.json

Step 3: Update the path (and filename if changed from the default) to the correct path of the headers file.

Step 4: Hit Ctrl+O to save the file and then Ctrl+X to exit the text editor.

Install Gem

gem install autoluv

Usage

Schedule a Check-In

autoluv schedule ABCDEF John Doe

Both departing and returning flights (if applicable) will be scheduled for all passengers tied to the confirmation number. After scheduling, there's no need to keep the terminal window open or active. The check in will happen behind the scenes at the appropriate time.

Note: If a first or last name includes a space, wrap it in double quotes (e.g. "Mary Kate")

Schedule a Check-In With Email Notification

Before using this command, follow the instructions below to configure the required settings.

autoluv schedule ABCDEF John Doe john.doe@email.com optional@bcc.com

The second email address is optional and will be BCCed the results.

Check In Immediately

autoluv checkin ABCDEF John Doe

Configure Email Notifications

This is optional, however, highly recommended. Especially if a scheduled check-in fails, you'll get notified and can manually check in. Every second counts!

Boarding positions are shown for each passenger when a check-in succeeds.

Step 1: Open/create the file .autoluv.env in your user's home directory.

nano ~/.autoluv.env

Step 2: Copy/paste the following into the text editor.

LUV_FROM_EMAIL  = from@email.com
LUV_USER_NAME   = from@email.com
LUV_PASSWORD    = supersecurepassword
LUV_SMTP_SERVER = smtp.email.com
LUV_PORT        = 587

Step 3: Replace the values with the appropriate SMTP settings for your email provider. LUV_FROM_EMAIL should be the email address associated with LUV_USER_NAME.

If your email account has two-factor authentication enabled, be sure to use an app-specific password and not your account password.

Step 4: Hit Ctrl+O to save the file and then Ctrl+X to exit the text editor.

Test Email Notifications

To verify your SMTP settings, schedule a check-in with invalid information and a valid email address.

autoluv schedule AAAAAA Fake Name valid@email.com

If everything is set up correctly, you'll get an email notifying you of an unsuccessful check-in.

Get Text Instead of Email Notifications

Use this Zap to get a custom Zapier email address that forwards emails as text messages. It's handy for people like me who don't have email notifications enabled on their phone or computer and want check-in results ASAP.

Manage Check-Ins

autoluv uses the at command behind the scenes to check in at a specific time. Use the related atq and atrm commands to manage check-ins.

View Scheduled Check-Ins

Make note of the first column's number.

atq
11	Tue Sep 22 08:05:00 2020 a user
12	Mon Sep 28 15:45:00 2020 a user
7	Wed Sep 23 11:40:00 2020 a user

Cancel a Check-In

atrm 11

View Check-In Details

The last line in the output will show you the confirmation number and name.

at -c 11

View All Scheduled Check-In Details

Display the list of all scheduled confirmation numbers and names.

atq | awk '{ print "at -c " $1 }' | bash | grep autoluv

Update Gem

gem update autoluv --conservative

Contributing

Bug reports and pull requests are welcome.

License

The gem is available as open source under the terms of the MIT License.