Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 2nd, 2012  |  syntax: Python  |  size: 0.55 KB  |  views: 1,929  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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