Skip to content

Instantly share code, notes, and snippets.

@alexeckermann
Created June 4, 2019 04:31
Show Gist options
  • Save alexeckermann/3f6a051e876e4c03e3b6341b7b05a7ad to your computer and use it in GitHub Desktop.
Save alexeckermann/3f6a051e876e4c03e3b6341b7b05a7ad to your computer and use it in GitHub Desktop.
WWDC 2019 replay video watch script
#!/bin/bash
# Execute this script to be notified when the WWDC 2019 replay video is available, maybe.
# Make sure this file is `chmod +x` to run in your Terminal.
while true
do
echo -n `date`
# Assumption is that the video page will contain an m3u8 file when the video is available.
KEYWORD_COUNT=$(curl -s https://www.apple.com/apple-events/june-2019/ | grep -c "m3u8")
if [[ $KEYWORD_COUNT > "0" ]]
then
echo -e " \033[42;1m AVAILABLE! \033[0m"
say -v Karen -r 250 "Dub Dub video available! Dub Dub video available!"
exit 0
fi
echo -e " \033[41;1m NOT AVAILABLE \033[0m ${KEYWORD_COUNT}"
# Checks only every 2 minutes
sleep 120
done
@alexeckermann
Copy link
Author

‼️ Video is up and this script didn't work

https://www.apple.com/apple-events/june-2019/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment