資源簡介
python微信回復
代碼片段和文件信息
#?coding=gbk
import?itchat?time
from?itchat.content?import?*
import?re
@itchat.msg_register([TEXT?MAP?CARD?NOTE?SHARING])
def?text_reply(msg):
????match1?=?re.search(‘你好‘?msg[‘Text‘])
????match2?=?re.search(‘微信認證‘?msg[‘Text‘])
????match3?=?re.search(‘小程序‘?msg[‘Text‘])
????#?match5?=?msg[‘Text‘]
????match6?=?re.search(‘火鍋‘?msg[‘Text‘])
????match7?=?re.search(‘嗯‘?msg[‘Text‘])
????match8?=?re.search(‘服務號‘?msg[‘Text‘])
????match9?=?re.search(‘在弄‘?msg[‘Text‘])
????match10?=?re.search(‘注冊了?‘?msg[‘Text‘])
????match11?=?re.search(‘傻逼‘?msg[‘Text‘])
????match12?=?re.search(‘資料‘?msg[‘Text‘])
????if?match1:
????????msg.user.send(‘%s‘?%?(“你好,有什么事情可以幫到您這邊嗎?“))
????if?match2:
????????msg.user.send(‘%s‘?%?(“這是微信認證申請方法:https://kf.qq.com/faq/161219Uj6jQF161219FB3Iz2.html
- 上一篇:python版經典貪吃蛇
- 下一篇:python實現 漢諾塔
評論
共有 條評論