#coding: utf-8
import os
import itchat
from pandas import DataFrame
def frindesinfo():
itchat.login()
friends = itchat.get_friends(update= True)
print ('my nickname : %s' % friends[0].NickName)
friendcount = len(friends)
print ('my have %d frindes' % friendcount)
gg = mm =unk = 0
for f in friends[1:]:
sex = f["Sex"]
if sex ==1:
gg +=1
elif sex ==2:
mm +=1
else:
unk +=1
print ('gg=%d, mm=%d, unknow=%d' % (gg,mm,unk))
def infoparams(keyparma, friends):
ret = []
for f in friends[1:]:
ret.append(f[keyparma])
return ret
def info2file():
itchat.login()
friends = itchat.get_friends(update=True)
nicknames = infoparams("NickName", friends)
sexs = infoparams("Sex", friends)
provinces = infopa
python扫码获取微信用户所有联系人的详细信息
最新推荐文章于 2024-04-20 02:50:30 发布