Prompt please, I wish to make automatic mail check through GAE, however the given script works on my computer but does not work in GAE enviroment (unable to login):
#!/usr/bin/env python import cookielib import urllib import urllib2 cj = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) urllib2.install_opener(opener) user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)' headers = { 'User-Agent' : user_agent } values = {'Email' : 'lo...@gmail.com', 'Passwd' : 'password', 'PersistentCookie' : 'yes', 'null': 'Sign in', 'rm': 'false', 'hl': 'en', 'service': 'mail', 'continue': 'https://mail.google.com/mail/h/'} data = urllib.urlencode(values) url = 'https://www.google.com/accounts/ServiceLoginAuth' req = urllib2.Request(url, data, headers) handle = urllib2.urlopen(req) req = urllib2.Request('https://mail.google.com/mail/h/') handle = urllib2.urlopen(req) print 'Content-Type: text/plain' print '' print handle.read() --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---