需求说明
媳妇儿又换工作了,这次是有关运营的,具体什么是运营我也不知道,有一项工作内容是使用微信定时的往微信群里发送指定的信息,来维护,她问我这个东西可不可以自动化,于是乎就研究了一下,找到了python的itchat这个工具,就写了一下。
功能点
- 使用微信,定时往指定的微信群里发送指定信息
- 需要发送的内容使用excel进行维护,指定要发送的微信群名、时间、内容
技术点
- itchat:这个是主要的工具,用于连接微信个人账号接口。以下是一些相关的知识点网站
- xlrd:这个是用来读Excel文件的工具
- apscheduler:这个是用来定时调度时间的工具
- 以上工具可以使用pip install进行安装
- 有些库包无法进行在线安装,可以在以下的网站搜索下载,然后使用pip install 文件名 这种方式进行安装
代码
1 | # coding=utf-8 |
Excel文件截图示例
启动程序命令以及截图示例
启动程序命令:python main.py
在启动后,界面会出现一个二维码,用微信扫描即可登录
CSDN博客地址:https://blog.csdn.net/yanlovehan/article/details/78302397