当前位置: 首页 > 后端技术 > Python

如何使用Python获取微信提现信息

时间:2023-03-26 15:45:34 Python

随着互联网的飞速发展和大众的需求,我们已经进入了微信时代。村口的张阿姨,家里的老父亲,都会用微信。但是当我们和朋友、亲人、爱人聊天的时候,我想大家都有过这样的经历。也就是微信撤回功能里说的,对方撤回一条消息。撤回的消息就像一个秘密,让你渴望一探究竟;或者像诱饵一样,瞬间引起你的浓厚兴趣。你想知道,那是一个什么样的句子?是对方无意中说出的真相,还是发错人的话?总之,退出的消息一出,让人顿时有种×××的感觉。这个时候,技术人员就该出来了。Python查看微信回复消息参考代码:`mportreimporttimeimportitchatfromitchat.contentimport*@itchat.msg_register([TEXT,PICTURE,MAP,CARD,NOTE,SHARING,RECORDING,ATTACHMENT,VIDEO])deftext_reply(msg):print(msg['文本'])@itchat.msg_register([文本、图片、地图、卡片、笔记、分享、录音、附件、视频])@itchat.msg_register([文本、图片、地图、卡片、笔记、分享,录音,附件,视频])deftext_reply(msg):ifmsg['Type']=='Text':reply_content=msg['Text']elifmsg['Type']=='Picture':reply_content=r"图片:"+msg['FileName']elifmsg['Type']=='Card':reply_content=r""+msg'RecommendInfo'+r"的名称"elifmsg['Type']=='地图':x,y,location=re.search(""+x.__str__()+"经度->"+y.__str__()else:reply_content=r"位置:"+locationelifmsg['Type']=='Note':reply_content=r"通知"elifmsg['Type']=='Sharing':reply_content=r"Share"elifmsg['Type']=='Recording':reply_content=r"Voice"elifmsg['Type']=='Attachment':reply_content=r"File:"+msg['FileName']elifmsg['Type']=='Video':reply_content=r"Video:"+msg['FileName']else:reply_content=r"message"friend=itchat.search_friends(userName=msg['FromUserName'])itchat.send(r"好友:%s--%s"r"时间:%s"r"消息:%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查啊。有些事情不知道比知道好。亲身体验吧。..