#!/usr/bin/python #coding=utf8 # 自行下载微信模块 itchat 小和QQ496631085 import itchat,os itchat.auto_login() # 可以自行看有什么数据 # print(itchat.get_friends(update=True)) for friend in itchat.get_friends(update=True)[0:]: #可以用此句print查看好友的微信名、备注名 # print(friend['NickName']+"("+friend['RemarkName']+")") img = itchat.get_head_img(userName=friend["UserName"]) path = friend['NickName']+".jpg" try: with open(path,'wb') as f: f.write(img) except Exception as e: print(repr(e))
转载于:https://www.cnblogs.com/xiaohe520/p/10714038.html