SHARE
TWEET

Untitled

a guest Aug 2nd, 2012 2,198 Never
  1. import urllib
  2. from googlevoice import Voice
  3. from googlevoice.util import input
  4. import time
  5. voice = Voice()
  6. voice.login("spinnelein@gmail.com","password")
  7. phoneNumber = "612-532-xxxx"
  8. text = "CHEM440 may be OPEN"
  9. i=0
  10. site = "https://oncourse.umn.edu/recreg/Pages/frmCourseDetail.aspx?serviceoff_pk=251757"
  11. a=urllib.urlopen(site).read()
  12.  
  13. while a.find("0 available") != -1:
  14.         time.sleep(60)
  15.         a=urllib.urlopen(site).read()
  16.         print a.find("0 available")
  17.        
  18.  
  19. while i < 10:
  20.         voice.send_sms(phoneNumber, text)
  21.         time.sleep(60)
  22.         i = i + 1
RAW Paste Data
Top