2009年3月17日星期二

how to login to google using program

i worked out a method. since login presentated in the http header cookie. so after i got the cookie, i can post using program as i was logged in.
so how to get the cookie? i found code on the net, using "get an AuthToken from Google accounts".
after that, in the case of appspot, using
"http://yourname.appspot.com/_ah/login?%s" % (urllib.urlencode(serv_args)) to redirect to it. it well be a http 403 redirect, and the cookie is there.
and when you having fun, remember to renew cookie, when the response acasionly will set-cookie to a new one, when old one was expired by google server.
that's all. did you even understand?

没有评论:

博客归档

neoedmund's shared items

我的简介

ZIP Code File