起因是某天早上看到这样一条朋友圈:
微信啥时候还有会员了?可怕,花里胡哨,这是要往QQ的方向发展吗。还是 Telegram 比较存粹。
《连IS恐怖组织都在使用,最安全的即时通讯软件——Telegram》https://mr96.me/441.html
(博客:https://Mr96.me)
图片中看到他是自动回复,做个机器人不就完了吗?于是开始查资料,发现已经有很多现成的代码,而且调用第三方 “图灵机器人” 更是不需要再弄语料库之类的,代码精简,去掉注释行和空格也就20多行代码.
第一步:安装环境
运行 Python 程序需要先安装 python 环境
直接在官网 https://www.python.org/ 下载
运行安装程序,选择自定义安装
然后点击 Next 下一步,来到下一个页面把这两个选项勾上。
install 安装,等待安装完成。
调出 cmd 命令窗口 执行:
python -V
显示 Python 的版本信息就安装成功了
安装需要的库 执行:
pip install itchat requests
第二步:运行机器人脚本
下载脚本:微信机器人https://pan.mr96.me/index.php/s/k9moa5A3z37DZxD
(调用的第三方图灵机器人,可以自己申请一个更换api key,也可以直接用我这个)
到下载目录,shift + 鼠标右键 打开命令窗口
执行命令: python + 文件名
python weixin_Robot.py
扫描二维码登录微信就可以了
显示登录成功 开启自动回复,看下效果:
图灵提供的技能拓展还是不少 自行测试:
注:18年申请的微信号无法使用机器人,因为18年的微信不支持网页端登录。
Hello @mr96! This is a friendly reminder that you have 3000 Partiko Points unclaimed in your Partiko account!
Partiko is a fast and beautiful mobile app for Steem, and it’s the most popular Steem mobile app out there! Download Partiko using the link below and login using SteemConnect to claim your 3000 Partiko points! You can easily convert them into Steem token!
https://partiko.app/referral/partiko
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @mr96! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word
STOP
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @mr96! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit