Python 8行代码微信自动聊天

需要先导入wxpy包

会自动跳出二维码,扫码登录

首先要自己去注册一个图灵机器人,网上有教程

from wxpy import *
turing = Tuling(api_key='a2787c27f0a6438b9ac7dd5d55a6dne2')#机器人的ID
bot=Bot()
friend=bot.friends().search('指定聊条人的名字')
@bot.register(chats=friend)
#@bot.register()
def communite(msg):
    resp=turing.do_reply(msg)
embed()

猜你喜欢

转载自www.cnblogs.com/Rime/p/11298619.html
今日推荐