- Add wxauto package with WeChat UI automation and message handling capabilities - Implement job_extractor.py for automated job posting extraction from WeChat groups - Add job_extractor_gui.py providing graphical interface for job extraction tool - Create comprehensive documentation in Chinese covering GUI usage, multi-group support, and quick start guides - Add build configuration files (build_exe.py, build_exe.spec) for packaging as standalone executable - Include utility scripts for WeChat interaction (auto_send_msg.py, get_history.py, receive_file_transfer.py) - Add project configuration files (pyproject.toml, setup.cfg, requirements.txt) - Include test files (test_api.py, test_com_fix.py) for API and compatibility validation - Add Apache 2.0 LICENSE and comprehensive README documentation - Configure .gitignore to exclude build artifacts, logs, and temporary files
3.6 KiB
3.6 KiB
wxautoV2版本
文档: 使用文档 | 云服务器wxauto部署指南
| 环境 | 版本 |
|---|---|
| OS | |
| 微信 | |
| Python |
使用示例
1. 基本使用
from wxauto import WeChat
# 初始化微信实例
wx = WeChat()
# 发送消息
wx.SendMsg("你好", who="张三")
# 获取当前聊天窗口消息
msgs = wx.GetAllMessage()
for msg in msgs:
print(f"消息内容: {msg.content}, 消息类型: {msg.type}")
2. 监听消息
from wxauto import WeChat
from wxauto.msgs import FriendMessage
import time
wx = WeChat()
# 消息处理函数
def on_message(msg, chat):
text = f'[{msg.type} {msg.attr}]{chat} - {msg.content}'
print(text)
with open('msgs.txt', 'a', encoding='utf-8') as f:
f.write(text + '\n')
if msg.type in ('image', 'video'):
print(msg.download())
if isinstance(msg, FriendMessage):
time.sleep(len(msg.content))
msg.quote('收到')
...# 其他处理逻辑,配合Message类的各种方法,可以实现各种功能
# 添加监听,监听到的消息用on_message函数进行处理
wx.AddListenChat(nickname="张三", callback=on_message)
# ... 程序运行一段时间后 ...
# 移除监听
wx.RemoveListenChat(nickname="张三")
交流
最后
如果对您有帮助,希望可以帮忙点个Star,如果您正在使用这个项目,可以将右上角的 Unwatch 点为 Watching,以便在我更新或修复某些 Bug 后即使收到反馈,感谢您的支持,非常感谢!
免责声明
代码仅用于对UIAutomation技术的交流学习使用,禁止用于实际生产项目,请勿用于非法用途和商业用途!如因此产生任何法律纠纷,均与作者无关!
3. 岗位信息提取(新增功能)
自动监听指定微信群,使用阿里云百炼API智能提取招聘岗位的结构化信息。
v1.1 新功能:
- ✓ 支持多群组同时监听
- ✓ 使用UUID作为岗位唯一标识
- ✓ 界面显示岗位来源群组
- ✓ API密钥打包时配置
# 1. 配置 config.json
{
"target_groups": [
"招聘信息群1",
"招聘信息群2"
],
"bailian_api_url": "https://dashscope.aliyuncs.com/api/v1/services/aigc/text-generation/generation",
"api_key": "your-api-key",
"output_file": "jobs_data.json"
}
# 2. 配置API密钥(打包前)
配置API密钥.bat
# 3. 运行岗位提取程序
python job_extractor_gui.py
# 4. 查看提取的岗位数据
python view_jobs.py
# 5. 测试API连接
python test_api.py
提取的信息包括:工作名称、工作描述、工作地点、薪资范围、公司名称、联系人、联系方式等。
详细使用说明请查看:
