Skip to main content

A simple wechat automation tool

Project description

wxauto (适用PC微信3.9.8.15版本)

2023-11-20重写wxauto,欢迎指出bug,欢迎pull requests

Windows版本微信客户端自动化,可实现简单的发送、接收微信消息、保存聊天图片

项目地址:https://github.com/cluic/wxauto

相关版本安装包下载OneDrive | 百度云

文档使用文档 | 云服务器wxauto部署指南

环境 版本
OS Windows
微信 Wechat (3.9.9疑似容易掉线)
Python Python (不支持3.7.6和3.8.1)

Star History Chart

获取wxauto

cmd窗口:

pip install wxauto

python窗口:

>>> import wxauto
>>> wxauto.VERSION
'3.9.8.15'
>>> wx = wxauto.WeChat()
初始化成功获取到已登录窗口xxx

示例

请先登录PC微信客户端

from wxauto import *


# 获取当前微信客户端
wx = WeChat()


# 获取会话列表
wx.GetSessionList()

# 向某人发送消息(以`文件传输助手`为例)
msg = '你好~'
who = '文件传输助手'
wx.SendMsg(msg, who)  # 向`文件传输助手`发送消息:你好~


# 向某人发送文件(以`文件传输助手`为例,发送三个不同类型文件)
files = [
    'D:/test/wxauto.py',
    'D:/test/pic.png',
    'D:/test/files.rar'
]
who = '文件传输助手'
wx.SendFiles(filepath=files, who=who)  # 向`文件传输助手`发送上述三个文件


# 下载当前聊天窗口的聊天记录及图片
msgs = wx.GetAllMessage(savepic=True)   # 获取聊天记录,及自动下载图片

注意事项

目前还在开发中,测试案例较少,使用过程中可能遇到各种Bug

如果遇到问题或者有新的想法,希望您可以通过以下两种方式联系我进行改进:

  • 微信:louxinghao(请备注wxauto,加群请备注加入交流群,合作、定制请备注合作)
  • 微信

最后

如果对您有帮助,希望可以帮忙点个Star,如果您正在使用这个项目,可以将右上角的 Unwatch 点为 Watching,以便在我更新或修复某些 Bug 后即使收到反馈,感谢您的支持,非常感谢!

免责声明

代码仅供交流学习使用,请勿用于非法用途和商业用途!如因此产生任何法律纠纷,均与作者无关!

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

wxauto-3.9.8.15.7.tar.gz (76.5 kB view details)

Uploaded Source

Built Distribution

wxauto-3.9.8.15.7-py3-none-any.whl (77.2 kB view details)

Uploaded Python 3

File details

Details for the file wxauto-3.9.8.15.7.tar.gz.

File metadata

  • Download URL: wxauto-3.9.8.15.7.tar.gz
  • Upload date:
  • Size: 76.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.3

File hashes

Hashes for wxauto-3.9.8.15.7.tar.gz
Algorithm Hash digest
SHA256 71741e550a63fd1af5c710f1c95cb721bfc43852459f43ecd6591c0033d19c42
MD5 78338b892bcd1732bbc07c66c650dc46
BLAKE2b-256 91c2554fb3920df33cc2fa814b47fe1dede62ad2f0e83f760dca52d89c12778b

See more details on using hashes here.

File details

Details for the file wxauto-3.9.8.15.7-py3-none-any.whl.

File metadata

  • Download URL: wxauto-3.9.8.15.7-py3-none-any.whl
  • Upload date:
  • Size: 77.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.3

File hashes

Hashes for wxauto-3.9.8.15.7-py3-none-any.whl
Algorithm Hash digest
SHA256 db10df12eef4dc6e26978c964c66522510e9d43ebf97fb166bb7c35fb4ba5d1d
MD5 7fa739a7abafdbb0ecff07dc49732c35
BLAKE2b-256 3bcf6a412bae938d36b35f0983179f1106626b752d3ba17704c5f3d4ff96e9cb

See more details on using hashes here.

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