第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > Python操作微信群发消息检测僵尸粉

Python操作微信群发消息检测僵尸粉

时间:2020-05-17 11:47:34

相关推荐

Python操作微信群发消息检测僵尸粉

"""使用流程:扫码登录微信网页版 / 若登录成功,则功能可使用,否则不可用"""import timefrom threading import Timerimport requestsfrom wxpy import *bot = Bot() # 连接微信,会出现一个登陆微信的二维码def get_news():"""获取金山词霸每日一句"""url = /dsapi = requests.get(url)content = r.json()[content]note = r.json()[ ote]return content, notedef send_news():"""指定微信昵称发:return:"""try:contents = get_news()my_friend = bot.friends().search(u珊)[0] # 这里是你微信好友的昵称my_friend.send(contents[0])my_friend.send(contents[1])my_friend.send(好久不见,十分想念)t = Timer(86400, send_news) # 这里是一天发送一次,86400s = 24ht.start()except Exception as e:print(发送失败,异常信息:, e)def

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。