设为首页 加入收藏

TOP

Python模拟登陆163邮箱并获取通讯(二)
2014-11-24 13:24:40 来源: 作者: 【 】 浏览:3
Tags:Python 模拟 登陆 163 邮箱 获取 通讯
xt,tag,getchildren()等

obj = obj[0].getchildren().pop()
for child in obj:
for x in child:
attr = x.attrib
if attr['name']== 'EMAIL;PREF':
value = {'email':x.text}
json.append(value)
return json

#Demo
print("Requesting......\n\n")
login = Login163('xxxx@163.com','xxxxx')
flag = login.login()
if type(flag) is bool:
print("Successful landing,Resolved contacts......\n\n")
res = login.address_list()
for x in res:
print(x['email'])
else:
print(flag)





附结果图:图1



图2:




以上主要就是cookielib,urllib2模块的使用


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇安装Python的visual模块时报错 下一篇S3C6410存储器映射

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: