2006年11月27日 星期一 10:56
Gmail登陆页面上的username和password的输入框的ID分别是"Email"和"Passwd",如何拼这个url?
2006年11月27日 星期一 12:02
1. 自己凭 http request, 走 socket post数据 2. post 数据过去登录成功后, 应该返回一些数据, 包括 cookies 3. 分析返回的 HTTP response, 分离出 cookies 4. 登录完成后, 你如果要再次请求页面, 得把 3 里分离出来的 cookies 重新凭到 http request 里发送 (因为有可能 cookie 里保存这一些登 录信息, 包括 session 相关的东西) Huang You Gong 写道: > Gmail登陆页面上的username和password的输入框的ID分别是"Email"和"Passwd",如何拼这个url? > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese
2006年11月27日 星期一 12:29
2006年11月27日 星期一 12:38
ºÃÏñÒªÓõ½cookie°É£¡ÓÐרÃÇÓ¦¶ÔÕâ·½ÃæµÇ½µÄÄ£¿é£¬È¥×ÄľÄñÉÏÕÒÕÒ¡£¾ßÌåÁ´½Ó£¬ÎҼDz»µÃÁË¡£ 2006/11/27, Huang You Gong <hygool在gmail.com>: > > GmailµÇÂ½Ò³ÃæÉϵÄusernameºÍpasswordµÄÊäÈë¿òµÄID·Ö±ðÊÇ"Email"ºÍ"Passwd"£¬ÈçºÎÆ´Õâ¸öurl? > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20061127/ea2d1f50/attachment.html
2006年11月27日 星期一 12:47
sf上面有个libgmail的项目,可以看一下。 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20061127/4f106873/attachment-0001.html
2006年11月27日 星期一 13:03
On 11/27/06, Huang You Gong <hygool在gmail.com> wrote: > > GmailµÇÂ½Ò³ÃæÉϵÄusernameºÍpasswordµÄÊäÈë¿òµÄID·Ö±ðÊÇ"Email"ºÍ"Passwd"£¬ÈçºÎÆ´Õâ¸öurl? > µÇ¼ÓÐרÃŵÄAPI, http://code.google.com/apis/accounts/Authentication.html Ö»ÏëÈ¡ÓʼþµÄ»°¿ÉÒÔÓà Atom Feed, http://gmail.google.com/support/bin/answer.py?answer=13465 »òÕß Óà POP/SMTP¶¼¿ÉÒÔ »¹ÓÐÒ»¸öpython µÄlib: http://libgmail.sourceforge.net/ Äĸö¸üºÏÊʾͿ´ÄãÒª¸ÉʲôÁË. -- simple is good http://brucewang.net skype: number5 -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20061127/ce2e98e2/attachment-0001.htm
2006年11月27日 星期一 13:18
¿ÉÒÔÓÃurllib2£¬Ç°Ãæ×Ô¶¯µÇ½Õⲿ·Ö¾ÍÏóÏÂÃæÕâÑù°É
data = urllib.urlencode({'continue': 'https://gmail.google.com/gmail',
'null': 'Sign+in',
'service': 'mail',
'Email': username,
'Passwd': password})
headers = {'Host': 'www.google.com', 'User-Agent': 'User-Agent: Mozilla/5.0 (compatible;)'}
req=urllib2.Request('https://www.google.com/accounts/ServiceLoginBoxAuth',data=data, headers=headers)
-----Original Message-----
From: python-chinese-bounces在lists.python.cn [mailto:python-chinese-bounces在lists.python.cn]On Behalf Of boyeestudio
Sent: Monday, November 27, 2006 12:38 PM
To: python-chinese在lists.python.cn
Subject: [SPAM] Re: [python-chinese] ÈçºÎÓÃPython×Ô¶¯µÇ½Gmail£¿
Importance: Low
ºÃÏñÒªÓõ½cookie°É£¡ÓÐרÃÇÓ¦¶ÔÕâ·½ÃæµÇ½µÄÄ£¿é£¬È¥×ÄľÄñÉÏÕÒÕÒ¡£¾ßÌåÁ´½Ó£¬ÎҼDz»µÃÁË¡£
2006/11/27, Huang You Gong < hygool在gmail.com>:
GmailµÇÂ½Ò³ÃæÉϵÄusernameºÍpasswordµÄÊäÈë¿òµÄID·Ö±ðÊÇ"Email"ºÍ"Passwd"£¬ÈçºÎÆ´Õâ¸öurl?
_______________________________________________
python-chinese
Post: send python-chinese在lists.python.cn python-chinese在lists.python.cn>
Subscribe: send subscribe to python-chinese-request在lists.python.cn
Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn> python-chinese-request在lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20061127/3409bdc0/attachment.htm
2006年11月27日 星期一 14:12
文档上有相关的 大概就是 import cookielib, urllib2 cj = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
2006年11月27日 星期一 16:25
用pamie吧 On 11/27/06, xbsun <xbsun at metarnet.com> wrote: > > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20061127/5254f82d/attachment.htm
2006年11月29日 星期三 03:44
如果只是为了下载邮件之类的操作, 显然pop3比较合算一些.. On 11/27/06, zhang peng <finalmdj在gmail.com> wrote: > 文档上有相关的 大概就是 > > import cookielib, urllib2 > cj = cookielib.CookieJar() > opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese
Zeuux © 2025
京ICP备05028076号