Created
April 25, 2015 23:23
-
-
Save ternus/906a153fd5041ee01f51 to your computer and use it in GitHub Desktop.
Checks where you are on the Firefly waitlist and keeps you logged in so you don't miss out.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ATHENA="ternus" | |
USERNAME="ternus@cternus.net" | |
PASSWORD="" | |
cwaitlistnum='' | |
while true; do | |
waitlistnum=$(curl -s -X POST https://tickets.fireflyartscollective.org/cgi-bin/ticketing.pl -F "email=$USERNAME" -F "password=$PASSWORD" -F "action=Log In" | pcregrep -o1 "(\d+) confirmed") | |
if [[ $waitlistnum == '' ]]; then | |
zwrite -d $ATHENA -m "Either you're now off the waitlist or something went wrong." | |
break | |
fi | |
if [[ $waitlistnum != $cwaitlistnum ]]; then | |
zwrite -d $ATHENA -m "You're now number $waitlistnum on the Firefly waitlist." | |
cwaitlistnum=$waitlistnum | |
fi | |
sleep 60 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hey this is pretty neat. for no really good reason I adjusted it slightly to return both total in the waitlist and active in the waitlist, and also to check every 10 minutes instead of 1 minute. I have no idea if this will be useful to you at all but just for giggles, enjoy.