码迷,mamicode.com
首页 > 微信 > 详细

wxpy微信应用

时间:2018-06-25 13:05:54      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:play   open   lap   imp   hide   closed   friend   The   color   

 

技术分享图片
import wxpy
bot = wxpy.Bot(console_qr=-1, cache_path=True)

my_friends = bot.friends()
male = 0
female = 0
other = 0
for friend in my_friends:
    if friend.sex == 1:
        male += 1
    elif friend.sex == 2:
        female += 1
    else:
        other += 1       
print("male = ", male)
print("female = ", female)
print("total numbers = ", len(my_friends))
好友性别统计

 

wxpy微信应用

标签:play   open   lap   imp   hide   closed   friend   The   color   

原文地址:https://www.cnblogs.com/yan1314/p/9223469.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!