python微信模块 itchat
2017-09-23 14:42
597 查看
基本微信朋友数据分析,在此做个笔记。#获取群聊成员信息
import itchat
itchat.login() #生成二维码,扫描二维码登录网页微信
chatrooms=itchat.get_chatrooms(update=True) #获取群聊信息
userName=chatrooms[2]['UserName'] #群聊名称,此时为第三个群
memberList = itchat.update_chatroom(userName=userName,detailedMember=True) #获取微信群成员信息,后面的参数必须设置为True,不然会获取不到成员信息
memberList=memberList.get('MemberList') #返回的类似于字典
#分析群聊成员基本信息
import pandas as pd #接下来,我们可以用pandas模块进行基本的数据统计
member=pd.DataFrame(memberList)参考:
[1] http://itchat.readthedocs.io/zh/latest/tutorial/tutorial0/
[2] http://www.bkjia.com/Pythonjc/1199097.html
[3] http://blog.csdn.net/isyiming/article/details/76018290 (获取群成员信息失效 )
[4] https://github.com/littlecodersh/ItChat Github文档
import itchat
itchat.login() #生成二维码,扫描二维码登录网页微信
chatrooms=itchat.get_chatrooms(update=True) #获取群聊信息
userName=chatrooms[2]['UserName'] #群聊名称,此时为第三个群
memberList = itchat.update_chatroom(userName=userName,detailedMember=True) #获取微信群成员信息,后面的参数必须设置为True,不然会获取不到成员信息
memberList=memberList.get('MemberList') #返回的类似于字典
#分析群聊成员基本信息
import pandas as pd #接下来,我们可以用pandas模块进行基本的数据统计
member=pd.DataFrame(memberList)参考:
[1] http://itchat.readthedocs.io/zh/latest/tutorial/tutorial0/
[2] http://www.bkjia.com/Pythonjc/1199097.html
[3] http://blog.csdn.net/isyiming/article/details/76018290 (获取群成员信息失效 )
[4] https://github.com/littlecodersh/ItChat Github文档
相关文章推荐
- 安装python itchat 模块 用python发微信消息
- 使用python抓取微信好友个性签名并形成词云(itchat;wordcloud)
- python实现微信接口(itchat)详细介绍
- 【itchat】用Python玩耍微信
- Python之itchat生成微信头像拼接问题
- python实现微信接口(itchat)
- 调用itchat模块实现微信自动回复
- Python利用itchat对微信中好友数据实现简单分析的方法
- Python itchat个人微信账号接口定时发送群消息
- 在python中使用itchat发送微信消息
- 在python中使用itchat发送微信消息
- 使用Python itchat个人微信账号头像拼接
- python微信库:itchat
- Python实现微信好友签名词云的构建(itchat、jieba、wordcloud)
- Python微信库:itchat的用法详解
- python实现微信接口(itchat)
- 用python itchat写一个微信机器人自动回复
- python使用itchat发送微信消息提醒
- 有了 itchat, python 调用微信个人号从未如此简单(新增 py3 支持)
- python-itchat微信消息群发、自动回复