Last active
October 10, 2023 02:04
-
-
Save darighost/974831eb71eebe154987b9e6724dcf06 to your computer and use it in GitHub Desktop.
Script made with daughter to alert us when our internet decides to come back on (guatemala life)
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
import requests | |
import subprocess | |
import time | |
while True: | |
try: | |
req = requests.get('https://google.com') | |
subprocess.run('say "Internet connection has been established"', shell=True) | |
break | |
except: | |
pass | |
time.sleep(5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Our internet went out again, so we wrote this script to alert us verbally when it starts back up