Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tech-shrimp/FreeWechatPush

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

8 Commits

Repository files navigation

免费微信推送

原理:申请免费的测试版公众号,可获得免费的模板推送功能。

视频教程

https://www.bilibili.com/video/BV1Ng4y1r7EP/

作者 技术爬爬虾 全网同名,转载请注明作者

申请公众号测试账户

使用微信扫码即可 https://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/login

进入页面以后我们来获取到这四个值

appID appSecret openId template_id

image

想让谁收消息,谁就用微信扫二维码,然后出现在用户列表,获取微信号(openId) image

新增测试模板获得 template_id(模板ID) image

模板标题随便填,模板内容如下,可以根据需求自己定制

模板一 天气预报:

今天:{{date.DATA}} 
地区:{{region.DATA}} 
天气:{{weather.DATA}} 
气温:{{temp.DATA}} 
风向:{{wind_dir.DATA}} 
对你说的话:{{today_note.DATA}}

模板二 课程提醒:

消息:{{message.DATA}}	

配置代码

将上面获得的几个值填入代码这几行 image

配置定时任务

修改这几行 image

安装python依赖,启动项目

pip3 install -r requirements.txt
python main.py

About

使用免费的微信测试公众号,做微信推送,给女朋友推送天气,课程提醒。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /