From 7f89bf7dd450c5eb2dd3b4a15859f77410aa96f8 Mon Sep 17 00:00:00 2001 From: Changhua Date: Sun, 16 Jul 2023 19:42:45 +0800 Subject: [PATCH] v39.0.1.0 --- clients/python/README.MD | 21 +++++++++++++++------ clients/python/demo.py | 6 +++++- clients/python/wcferry/client.py | 6 +++--- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/clients/python/README.MD b/clients/python/README.MD index ec2d9e0..4150fe1 100644 --- a/clients/python/README.MD +++ b/clients/python/README.MD @@ -39,7 +39,7 @@ def process_msg(wcf: Wcf): def main(): LOG.info("Start demo...") - wcf = Wcf(debug=True) + wcf = Wcf(debug=True) # 默认连接本地服务 sleep(5) # 等微信加载好,以免信息显示异常 LOG.info(f"已经登录: {True if wcf.is_login() else False}") @@ -49,7 +49,7 @@ def main(): # wcf.enable_recv_msg(LOG.info) # deprecated # 允许接收消息 - wcf.enable_receiving_msg() + wcf.enable_receiving_msg(pyq=True) # 同时允许接收朋友圈消息 Thread(target=process_msg, name="GetMessage", args=(wcf,), daemon=True).start() # wcf.disable_recv_msg() # 当需要停止接收消息时调用 @@ -71,7 +71,7 @@ def main(): sleep(5) LOG.info(f"DBs:\n{wcf.get_dbs()}") - LOG.info(f"Tables:\n{wcf.get_tables('MicroMsg.db')}") + LOG.info(f"Tables:\n{wcf.get_tables('db')}") LOG.info(f"Results:\n{wcf.query_sql('MicroMsg.db', 'SELECT * FROM Contact LIMIT 1;')}") # 需要真正的 V3、V4 信息 @@ -85,6 +85,10 @@ def main(): # ret = wcf.del_chatroom_members("chatroom id", "wxid1,wxid2,wxid3,...") # LOG.info(f"add_chatroom_members: {ret}") + sleep(5) + wcf.refresh_pyq(0) # 刷新朋友圈第一页 + # wcf.refresh_pyq(id) # 从 id 开始刷新朋友圈 + # 一直运行 wcf.keep_running() @@ -123,6 +127,11 @@ python -m grpc_tools.protoc --python_out=. --proto_path=../../../WeChatFerry/rpc ``` ## 版本更新 + +### 39.0.1.0 (2023.07.16) +* 获取朋友圈消息 + +
点击查看更多 版本号:`w.x.y.z`。 其中: @@ -131,9 +140,6 @@ python -m grpc_tools.protoc --python_out=. --proto_path=../../../WeChatFerry/rpc * `y` 是 `WeChatFerry` 的版本,从 0 开始 * `z` 是各客户端的版本,从 0 开始 -### 39.0.0.1 (2023.07.15) -修复不能 @ 问题。 - 功能: * 检查登录状态 @@ -154,4 +160,7 @@ python -m grpc_tools.protoc --python_out=. --proto_path=../../../WeChatFerry/rpc * 添加群成员 * 删除群成员 * 解密图片 +* 获取朋友圈消息 * 某功能(Breaking Change) + +
diff --git a/clients/python/demo.py b/clients/python/demo.py index 4b42186..3363fe0 100644 --- a/clients/python/demo.py +++ b/clients/python/demo.py @@ -34,7 +34,7 @@ def main(): # wcf.enable_recv_msg(LOG.info) # deprecated # 允许接收消息 - wcf.enable_receiving_msg() + wcf.enable_receiving_msg(pyq=True) # 同时允许接收朋友圈消息 Thread(target=process_msg, name="GetMessage", args=(wcf,), daemon=True).start() # wcf.disable_recv_msg() # 当需要停止接收消息时调用 @@ -70,6 +70,10 @@ def main(): # ret = wcf.del_chatroom_members("chatroom id", "wxid1,wxid2,wxid3,...") # LOG.info(f"add_chatroom_members: {ret}") + sleep(5) + wcf.refresh_pyq(0) # 刷新朋友圈第一页 + # wcf.refresh_pyq(id) # 从 id 开始刷新朋友圈 + # 一直运行 wcf.keep_running() diff --git a/clients/python/wcferry/client.py b/clients/python/wcferry/client.py index 7fd3b31..430eb1b 100644 --- a/clients/python/wcferry/client.py +++ b/clients/python/wcferry/client.py @@ -1,7 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -__version__ = "39.0.0.1" +__version__ = "39.0.1.0" import atexit import base64 @@ -527,11 +527,11 @@ class Wcf(): rsp = self._send_request(req) return rsp.status - def refresh_pyq(self, id: int) -> int: + def refresh_pyq(self, id: int = 0) -> int: """刷新朋友圈 Args: - id (int): 开始 id + id (int): 开始 id,0 为最新页 Returns: int: 1 为成功,其他失败