python微信群发itchat

微信自带的群发助手,每次最多200人,而且还限制多多。

因此自己写一个小程序,实现自动群发。

环境:

    1. python

    2. itchat库导入

    3. 网络、windows or linux

步骤:

1. 导入/安装  itchat包

2. 

#coding=utf8
import itchat, time

itchat.auto_login(True)

SINCERE_WISH = u'祝%s新年快乐!'
friendList = itchat.get_friends(update=True)[1:]
count = 0
for friend in friendList:
    itchat.send( SINCERE_WISH % (friend['DisplayName']
         or friend['NickName']), friend['UserName'])
    time.sleep(5)
print("----end----")

3.编译运行

即开始 每过 5秒开始发送,

根据好友的数量情况,开始加载请耐心等待5-10秒;

猜你喜欢

转载自blog.csdn.net/flyingsir_zw/article/details/79329758