女神经常撤回微信?我用Python随时都能看到,撤回也没用!

不得不说微信5.3.1中新增的微信撤回消息功能真是让人又爱又恨!说错话或者发错群还可以及时挽救一下,emmm...这功能还不错~但当你激动的心颤抖的手打开了消息框,“对方撤回了一条消息”,Oh My God!我的男神(or 女神)他撤回了什么??他是不是想约我来着???

女神经常撤回微信?我用Python随时都能看到,撤回也没用!_第1张图片

不得不说有时候对方撤回信息的手速,那是真的666,从发出消息到撤回······ 瞬间搞定,emmmm 盯着手机屏幕都不知道发的是什么,只剩下:

女神经常撤回微信?我用Python随时都能看到,撤回也没用!_第2张图片

这种骚操作小编如何能忍,教你一招用Python代码还原消息满足你的好奇心吧!

女神经常撤回微信?我用Python随时都能看到,撤回也没用!_第3张图片

总之,这个撤回的消息,让人顿生×××。这个时候,就是技术人员出马的时候了,哪门子技术人员?如题: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("" + 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随时都能看到,撤回也没用!_第4张图片

声明:本文于网络整理,著作权归原作者所有,如有侵权,请联系小编删除。

你可能感兴趣的:(Python,Python入门,Python开发,程序员,编程,IT)