Last active
September 30, 2020 12:31
-
-
Save erickhun/038c9df8941d4966fef0737394b98df2 to your computer and use it in GitHub Desktop.
Check Taipei Universiade Tickets
This file contains hidden or 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 | |
# Usage : This will check against `page_url` every 180 seconds, put it in a screen or tmux session : | |
# $ while true; do sh ticket.sh; sleep 180; done | |
# | |
page_url='https://tickets.2017.taipei/ticket/area/17_TPE_18/2952' | |
email='[email protected]' | |
#Let's check the length return of the event page | |
page=`curl -s ${page_url}` | |
size=${#page} | |
# The len is longer than 264 chararacters, the tickets is available! | |
if [ "$size" -gt 264 ] | |
then | |
echo "Ticket available! :)" | |
echo "Buy ticket now! -> ${page_url}" | mail -s "Volleyball Ticket available TPE-JPN FRA-BRA" ${email} | |
else | |
echo "Still sold out..." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script was used to get notified by email when some tickets for volleyball games were released during Taipei 2017 Summer Universiade