当前位置: 移动技术网 > IT编程>脚本编程>Python > Python查看微信撤回消息代码

Python查看微信撤回消息代码

2019年06月16日  | 移动技术网IT编程  | 我要评论

电视机维修网,ccc26com,深圳挂号网上预约

微信(wechat) 是腾讯公司于2011年1月21日推出的一个为智能终端提供即时通讯服务的免费应用程序,由张小龙所带领的腾讯广州研发中心产品团队打造 。在互联网飞速发展的下、民众的需求下,微信已经更新到2.6.2.31版本,全民微信时代。村口的张大妈,家里的老父亲都知道怎么使用微信。


微信撤回消息功能是在微信的5.3.1中新增的。

如果需要撤回微信消息,长按刚刚发出去的消息,会弹出菜单,其中有撤回选项。点击撤回后可以看到提示,会撤回刚才发出去的最后一条微信消息。点击确定后,你会看到“你撤回了一条消息”的提示。

同时刚才的消息也从聊天记录中删除了。当你撤回微信消息后,对方虽然看不到你发送的消息,但会收到一条提示,显示你撤回一条消息。

当我们与朋友,亲人,爱人聊天的时候,我估计每个人都经理过,那就是微信撤回功能中所提到的,对方撤回一条消息。

俗话说,说出口的话,如泼出去的水,是收不回的。但今天可以了,在微信和qq上,你可以撤回你刚刚说的话。当你的手机发出“嘀”的提示音,表示你收到了一条消息。忙打开,迫不及待地看看,是谁又在与自己说话。还没来得及看,或还没有看完,那句话却忽然没了,屏幕上显示“对方撤回了一条消息”。这个时候,我们都会有所感受

每天,我们的手机都会收到大量的信息,包括别人与你说的话,其中的绝大多数,都属于可有可无的话,即垃圾信息。你也许为此不胜其烦,但有一条消息,一定能够引起你的关注,那就是“对方撤回了一条消息”。

一条撤回的消息,就像一个秘密,让你迫切地想去一探究竟;或如一个诱饵,瞬间勾起你强烈的兴趣。你想知道,那是怎样的一句话?是对方不慎讲出的真话,还是一句发错了对象的话?

总之,这个撤回的消息,让人顿生×××。这个时候,就是技术人员出马的时候了,哪门子技术人员?如题: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查看了,有些事情不知道比知道要好。亲身经历,下次再见!

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网