[英]How to log WeChat's history?
我想从微信接收聊天记录(理想情况下是自动)。 关键是我们使用微信与几个亚洲合作伙伴进行公司沟通,并希望与整个团队共享对话。 各方都同意将历史保存在微信之外,这一点很重要,因此我们可以选择所有可能的选择。
有一个API和几个库可以使用。 Python中的示例代码如下所示:
# -*- coding: utf-8 -*-
import itchat, time
from itchat.content import *
# itchat.auto_login() # in case you want to use the PNG QR version
itchat.auto_login(enableCmdQR=2)
@itchat.msg_register(itchat.content.TEXT)
def text_reply(msg):
print ( "\nNew incoming message: " )
print msg['Content'] # Print the received message
print msg['User']['Alias'] # Show the senders alias
itchat.run()
我正在使用这个库: https : //github.com/littlecodersh/ItChat/blob/master/README_EN.md
从那里可以将消息注入CRM系统,例如以跟踪历史记录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.