SHARE
TWEET

Untitled

a guest Jul 4th, 2011 83 Never
  1. import os
  2.  
  3. #Enter your username and password below within double quotes
  4. # eg. username="username" and password="password"
  5. username="blablabla"
  6. password="blablabla"
  7. com="wget -q -O - https://"+username+":"+password+"@mail.google.com/mail/feed/atom --no-check-certificate"
  8.  
  9. temp=os.popen(com)
  10. msg=temp.read()
  11. index=msg.find("<fullcount>")
  12. index2=msg.find("</fullcount>")
  13. fc=int(msg[index+11:index2])
  14.  
  15. if fc==0:
  16.    print "0 new"
  17. else:
  18.    print str(fc)+" new"
RAW Paste Data
Top