Skip to content

Instantly share code, notes, and snippets.

@ojii
Created July 20, 2011 13:27
Show Gist options
  • Save ojii/1094946 to your computer and use it in GitHub Desktop.
Save ojii/1094946 to your computer and use it in GitHub Desktop.
Is the Apple store open? (Linux User Version)
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!"
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