這樣做,有點不太好,只是交流稽物。我用的是python3,這里需要安裝wxpy庫
from wxpy import *
bot = Bot(console_qr=True, cache_path=True) #創(chuàng)建wx對象
my_friend = my_friend = bot.friends() #查找所有好友
for i in my_friend: #遍歷好友折欠,發(fā)送短信
name = i.name #獲取好友名字贝或,保證每個人發(fā)送的都不一樣。要注意有備注的锐秦,要不然發(fā)出去的是被人的網名咪奖,就不好了
i.send(name+'祝福短信的內容')
print("執(zhí)行完成")