Created
July 20, 2011 13:27
-
-
Save ojii/1094946 to your computer and use it in GitHub Desktop.
Is the Apple store open? (Linux User Version)
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
import requests | |
import time | |
store_open = False | |
while not store_open: | |
response = requests.get('http://store.apple.com/') | |
if "We'll be back soon" not in response.content: | |
break | |
print "Meh." | |
time.sleep(30) | |
print "Meh!" |
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
import requests | |
import subprocess | |
import time | |
store_open = False | |
def say(command): | |
subprocess.Popen('ikazuchi speech -s "%s"' % command, | |
shell=True).communicate() | |
while not store_open: | |
response = requests.get('http://store.apple.com/') | |
if "We'll be back soon" not in response.content: | |
break | |
say("Meh") | |
time.sleep(30) | |
say("Meh!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment