20行python代码实现微信群发与消息轰炸!
今天支付宝又开始了集五福活动,为了更多的人和我交换福卡······················
不幸的是,忙活了大半天,我还是缺敬业福。。。
学习Python中有不明白推荐加入交流群
号:864573496
群里有志同道合的小伙伴,互帮互助,
群里有不错的视频学习教程和PDF!
1import itchat
2importtime
3#print('扫一下弹出来的二维码')
4itchat.auto_login(hotReload=True)
5names = ['chengli','fang','genggeng','hanling','juan','ll','short','md','miao','qiaohong','shuai',
6'sunhao','wangdan','whp','xiangxiang','xinxin']
7name = ['short','short']
8foriinrange(16):
9boom_remark_name = names[i]
10#boom_remark_name ='亚述'
11#message =input('输入你要轰炸的内容:')
12message ='支付宝五福了解一下'
13boom_obj = itchat.search_friends(remarkName=boom_remark_name)[0]['UserName']
14itchat.send_msg(msg=message, toUserName=boom_obj)
15#print(str(boom_remark_name)+' 已发送!')
另一个有趣的使用就是消息轰炸了,烦到别人删好友。
1import itchat
2import time
3#print('扫一下弹出来的二维码')
4itchat.auto_login(hotReload=True)
5names = 'short'
6
7
8while(True):
9boom_remark_name = names
10message = '滚去学习!!!'
11boom_obj = itchat.search_friends(remarkName=boom_remark_name)[0]['UserName']
12itchat.send_msg(msg=message, toUserName=boom_obj)
13print(str(boom_remark_name)+' 已发送!')
14time.sleep(1)