python之获取微信好友列表并保存文档中
时间:2019-03-06 23:10:52
收藏:0
阅读:245
代码如下
from wxpy import * from pprint import pprint #登录微信 bot = Bot() my_friend = bot.friends() f = open("friends.txt", ‘w‘, encoding="utf-8") # 创建friend文件,并将好友信息存进文档 #好友排序 for friend in my_friend: line = str(friend) + "\n" f.write(line)
原文:https://www.cnblogs.com/qzzhou/p/10486380.html
评论(0)