Skip to main content

a python wechat robot framework for personal account

Project description

面向个人账户的微信机器人框架

已实现功能:

  • 扫描二维码登陆获取联系人

  • 清理好友(由于接口限制,可能会失败)

  • 接收文本消息和位置消息

  • 消息过滤(来源过滤,目标过滤,文本过滤) 如过滤腾讯新闻文本消息:

    @api.textMsg
    @api.sourceFilter('腾讯新闻',beside=True)
    def FiltedTxtMsgHandler(message):
        print('%s给%s发送了一个消息'%(message.fromUserName,message.toUserName))
        print('-> %s:%s'%(message.fromUserName,message.content))
  • 手机端互动/退出/消息接收回调接口 手机客户端互动回调:

    @robot.onPhoneInteract
    def onPhoneInteract():
        print('[*] 你在手机上玩了微信被我发现了')

Usage

普通用户

  1. 下载项目到本地(git clone或直接下载)

  2. 配置环境: (1). 安装python3.4pip (2). 安装依赖包:pip install -r requirement.txt

  3. 运行:进入项目目录,python myrobot.py

开发者

接口用法参照myrobot.py

Credit

I used

WeixinBot by Urinx

WeRobot by whtsky

wechat-deleted-friends by 0x5e

Todo

  • [ ] 添加更多类型消息接口

  • [ ] 自动回复

  • [ ] 小黄鸡或图灵机器人自动回复

  • [ ] 主动发送消息

  • [ ] 用微信遥控电脑

反馈

有问题或者意见可以到Issues中提出

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wxrobot-0.12.tar.gz (14.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page