这期内容当中小编将会给大家带来有关使用Python怎么查看微信撤回消息,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。
1、简单易用,与C/C++、Java、C# 等传统语言相比,Python对代码格式的要求没有那么严格;2、Python属于开源的,所有人都可以看到源代码,并且可以被移植在许多平台上使用;3、Python面向对象,能够支持面向过程编程,也支持面向对象编程;4、Python是一种解释性语言,Python写的程序不需要编译成二进制代码,可以直接从源代码运行程序;5、Python功能强大,拥有的模块众多,基本能够实现所有的常见功能。
Python查看微信撤回消息源代码:
mport re import time import itchat from itchat.content import * @itchat.msg_register([TEXT, PICTURE, MAP, CARD, NOTE, SHARING, RECORDING, ATTACHMENT, VIDEO]) def text_reply(msg): print(msg['Text']) @itchat.msg_register([TEXT, PICTURE, MAP, CARD, NOTE, SHARING, RECORDING, ATTACHMENT, VIDEO]) @itchat.msg_register([TEXT, PICTURE, MAP, CARD, NOTE, SHARING, RECORDING, ATTACHMENT, VIDEO]) def text_reply(msg): if msg['Type'] == 'Text': reply_content = msg['Text'] elif msg['Type'] == 'Picture': reply_content = r"图片: " + msg['FileName'] elif msg['Type'] == 'Card': reply_content = r" " + msg['RecommendInfo']['NickName'] + r" 的名片" elif msg['Type'] == 'Map': x, y, location = re.search("<location x=\"(.*?)\" y=\"(.*?)\".*label=\"(.*?)\".*", msg['OriContent']).group(1, 2, 3) if location is None: reply_content = r"位置: 纬度->" + x.__str__() + " 经度->" + y.__str__() else: reply_content = r"位置: " + location elif msg['Type'] == 'Note': reply_content = r"通知" elif msg['Type'] == 'Sharing': reply_content = r"分享" elif msg['Type'] == 'Recording': reply_content = r"语音" elif msg['Type'] == 'Attachment': reply_content = r"文件: " + msg['FileName'] elif msg['Type'] == 'Video': reply_content = r"视频: " + msg['FileName'] else: reply_content = r"消息" friend = itchat.search_friends(userName=msg['FromUserName']) itchat.send(r"Friend:%s -- %s " r"Time:%s " r" Message:%s" % (friend['NickName'], friend['RemarkName'], time.ctime(), reply_content), toUserName='filehelper') itchat.send(r"我已经收到你在【%s】发送的消息【%s】稍后回复。--微信助手(Python版)" % (time.ctime(), reply_content), toUserName=msg['FromUserName']) itchat.auto_login() itchat.run()
上述就是小编为大家分享的使用Python怎么查看微信撤回消息了,如果刚好有类似的疑惑,不妨参照上述分析进行理解。如果想知道更多相关知识,欢迎关注亿速云行业资讯频道。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。