python利用wxpy监控微信公众号

此次利用wxpy可以进行微信公众号的消息推送监测(代码超级简单),这样能进行实时获取链接。但是不光会抓到公众号的消息,好友的消息也会抓到(以后会完善的,毕竟现在能用了,而且做项目的微信号肯定是没有好友的)话不多说,直接扔代码(简直好用的不得了)!

# coding=utf-8
from wxpy import *


bot = Bot()
@bot.register()
def print_others(msg):
    msg.forward(bot.file_helper)  
    sent_msgs = bot.messages.search(sender=bot.self) 

embed()

 

posted @ 2018-04-16 10:15  都是他舅  阅读(953)  评论(0编辑  收藏  举报