itchat是python的一个api,可以访问自己的微信信息,功能还蛮好玩的,可以扒取朋友信息,自动回复短信等等。
package:
itchat1.3.10 + python3.5 + wordcloud1.4.1
登录登出:
itchat.login()
#hotReload设置为True,可以保持一段时间登录
itchat.autologin(hotReload=True)
itchat.logout()
获取朋友数据:
friends = itchat.get_friends(update=True)[0:]
搜索某个朋友:
itchat.search_friends(name='name')
itchat.search_friends(wechatAccount='wechatid')
公众号和群聊的获取方式也是类似的:
itchat.get_mps(update=True)[0:]
itchat.search_mps()
itchat.get_chatrooms(update=True)[0:]
itchat.search_chatroom()
发信息ÿ

本文介绍了如何利用itchat Python库访问并分析个人微信信息,包括朋友数据、自动回复、信息发送等功能。通过实例展示了如何获取朋友的signature,并使用wordcloud进行可视化展示。
最低0.47元/天 解锁文章
2309

被折叠的 条评论
为什么被折叠?



