diff --git a/README.md b/README.md index 874dcf3..5671f6c 100644 --- a/README.md +++ b/README.md @@ -137,9 +137,7 @@ qq交流群:577704006(左边二维码) or 点击链接加入群聊[pywxdum # 四、致谢 -[![PyWxDump 贡献者](https://contrib.rocks/image?repo=xaoyaoo/PyWxDump)](https://github.com/xaoyaoo/PyWxDump/graphs/contributors) - -[![UI 贡献者](https://contrib.rocks/image?repo=xaoyaoo/wxdump_web)](https://github.com/xaoyaoo/wxdump_web/graphs/contributors) +[![PyWxDump 贡献者](https://contrib.rocks/image?repo=xaoyaoo/PyWxDump)](https://github.com/xaoyaoo/PyWxDump/graphs/contributors)[![UI 贡献者](https://contrib.rocks/image?repo=xaoyaoo/wxdump_web)](https://github.com/xaoyaoo/wxdump_web/graphs/contributors) # 五、许可证 diff --git a/pywxdump/api/api.py b/pywxdump/api/api.py index 0f71b05..e11bab9 100644 --- a/pywxdump/api/api.py +++ b/pywxdump/api/api.py @@ -99,6 +99,8 @@ def contact_count_list(): chat_count = analyzer.get_chat_count(msg_path) for contact in contact_list: contact["chat_count"] = chat_count.get(contact["username"], 0) + # 去重 + contact_list = [dict(t) for t in {tuple(d.items()) for d in contact_list}] # 降序 contact_list = sorted(contact_list, key=lambda x: x["chat_count"], reverse=True) diff --git a/pywxdump/api/rjson.py b/pywxdump/api/rjson.py index 8985892..11a3e87 100644 --- a/pywxdump/api/rjson.py +++ b/pywxdump/api/rjson.py @@ -1,7 +1,7 @@ import logging -def ReJson(code: int, body: dict = None, msg: str = None, error: str = None, extra: dict = None) -> dict: +def ReJson(code: int, body: [dict, list] = None, msg: str = None, error: str = None, extra: dict = None) -> dict: """ 返回格式化的json数据 :param code: 状态码 int