春节问候微信群发

bot.core.memberList

{'Uin': 0, 'UserName': '@a6bd2333c4a1fc95a0c2cdfcaf114fe79109c65a657ac90c8093fd0589efe60a', 'NickName': '数据小咖', 'HeadImgUrl': '/cgi-bin/mmwebwx-bin/webwxgeticon?seq=671394782&username=@a6bd2333c4a1fc95a0c2cdfcaf114fe79109c65a657ac90c8093fd0589efe60a&skey=@crypt_80b66f9e_b7aa507aacd908452c1e59c6ff441b1d', 'ContactFlag': 3, 'MemberCount': 0, 'MemberList': [], 'RemarkName': '', 'HideInputBarFlag': 0, 'Sex': 0, 'Signature': '专注大数据培训。', 'VerifyFlag': 0, 'OwnerUin': 0, 'PYInitial': 'SJXG', 'PYQuanPin': 'shujuxiaoga', 'RemarkPYInitial': '', 'RemarkPYQuanPin': '', 'StarFriend': 0, 'AppAccountFlag': 0, 'Statues': 0, 'AttrStatus': 102725, 'Province': '', 'City': '', 'Alias': '', 'SnsFlag': 1, 'UniFriend': 0, 'DisplayName': '', 'ChatRoomId': 0, 'KeyWord': '', 'EncryChatRoomId': '', 'IsOwner': 0}

  



 

 

 

from wxpy import Bot
import time,random

# 初始化机器人,扫码登陆
bot = Bot()
s = '爆竹声中一岁除,春风送暖入屠苏。千门万户曈曈日,总把新桃换旧符。恭祝新年快乐!'
for friend in bot.friends():
    n = friend.name
    if 'abc' not in n and 'y' != n[0]:
        try:
            friend.send(s)
            time.sleep(random.random())
        except Exception as e:
            print(e)

  

 

 

 

 




posted @ 2019-02-04 10:03  papering  阅读(225)  评论(0编辑  收藏  举报