Last active
July 6, 2021 14:14
-
-
Save Cabeda/c6a7c3237b85d518d641f62bd7268389 to your computer and use it in GitHub Desktop.
Script to notify when one can schedule COVID-19 vacination in Portugal
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 | |
day=$1 | |
month=$2 | |
year=$3 | |
while true; | |
do | |
status_code=$(curl -s -o /dev/null -w "%{http_code}" 'https://covid19.min-saude.pt/pedido-de-agendamento/' \ | |
-H 'Content-Type: application/x-www-form-urlencoded' \ | |
--data-raw 'f_dia='$day'&f_mes='$month'&f_ano='$year) | |
if [ $status_code = 302 ] | |
then | |
osascript -e 'display notification "Vai-te vacinar seu lunático!!!"' | |
say -v Joana "Vai-te vacinar seu lunático!!!" | |
fi | |
sleep 60 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment